/* AI 资讯页（对齐设计稿） */
.yw-news-page {
	background: linear-gradient(180deg, #f8f9fb 0%, var(--yw-bg) 180px);
	padding-bottom: 48px;
}

.yw-news-layout {
	display: grid;
	grid-template-columns: 268px minmax(0, 1fr) 300px;
	gap: 24px;
	align-items: start;
}

.yw-news-center {
	min-width: 0;
}

.yw-news-aside--left {
	position: sticky;
	top: 88px;
}

/* 右栏仅内层 .yw-panel 为卡片，避免与 .yw-aside 双重白底 */
.yw-news-page .yw-news-aside.yw-news-aside--right {
	padding: 0;
	background: transparent;
	border: none;
	box-shadow: none;
	border-radius: 0;
	display: grid;
	gap: 16px;
}

.yw-news-aside--right .yw-panel {
	padding: 16px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--yw-border);
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

/* 左侧 · 热门标签 */
.yw-news-tags .yw-cat-sidebar__section-title {
	margin-bottom: 12px;
}

.yw-news-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.yw-news-tag-cloud__item {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	max-width: 100%;
	padding: 6px 11px 6px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	color: #475569;
	background: #f8fafc;
	border: 1px solid #e8edf3;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.yw-news-tag-cloud__item:hover {
	color: var(--yw-primary-dark);
	background: #eef2ff;
	border-color: #c7d2fe;
	box-shadow: 0 1px 4px rgba(79, 70, 229, 0.08);
	text-decoration: none;
}

.yw-news-tag-cloud__item.is-active {
	color: var(--yw-primary-dark);
	background: #eef2ff;
	border-color: #a5b4fc;
	box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.12);
}

.yw-news-tag-cloud__hash {
	font-size: 12px;
	font-weight: 800;
	color: var(--yw-primary);
	line-height: 1;
	flex-shrink: 0;
}

.yw-news-tag-cloud__item:hover .yw-news-tag-cloud__hash,
.yw-news-tag-cloud__item.is-active .yw-news-tag-cloud__hash {
	color: var(--yw-primary-dark);
}

.yw-news-tag-cloud__label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.yw-news-tag-cloud__more {
	display: inline-flex;
	align-items: center;
	margin-top: 12px;
	font-size: 13px;
	font-weight: 600;
	color: var(--yw-primary);
	text-decoration: none;
}

.yw-news-tag-cloud__more:hover {
	color: var(--yw-primary-dark);
	text-decoration: none;
}

.yw-news-subscribe__desc {
	margin: 0 0 10px;
	font-size: 12px;
	color: var(--yw-muted);
	line-height: 1.45;
}

.yw-news-subscribe__form {
	display: grid;
	gap: 10px;
}

.yw-news-subscribe__note {
	margin: 8px 0 0;
	font-size: 12px;
	color: var(--yw-muted);
	text-align: center;
}

.yw-news-archive-head {
	margin-bottom: 12px;
}

/* 焦点区（头条 + 右侧四卡，对齐设计稿） */
.yw-news-spotlight {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-bottom: 24px;
	align-items: stretch;
}

.yw-news-spotlight--with-stack {
	grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
}

.yw-news-spotlight__main {
	min-width: 0;
	display: flex;
}

.yw-news-spotlight--with-stack .yw-news-spotlight__main,
.yw-news-spotlight--with-stack .yw-news-spotlight__stack {
	min-height: 400px;
}

.yw-news-spotlight__stack {
	display: grid;
	grid-template-rows: repeat(4, minmax(0, 1fr));
	gap: 12px;
	min-width: 0;
	height: 100%;
}

/* 头条（覆盖 main.css 旧样式） */
.yw-news-page .yw-news-hero {
	flex: 1;
	width: 100%;
	border-radius: 20px;
	overflow: hidden;
	background: transparent;
	color: #fff;
	box-shadow: 0 10px 32px rgba(67, 56, 202, 0.18);
	min-height: 0;
}

.yw-news-page .yw-news-hero__link {
	display: block;
	height: 100%;
	min-height: 100%;
	color: inherit;
	text-decoration: none;
}

.yw-news-page .yw-news-hero__link:hover {
	text-decoration: none;
}

.yw-news-page .yw-news-hero__media {
	position: relative;
	height: 100%;
	min-height: 100%;
	aspect-ratio: auto;
	background: linear-gradient(145deg, #4f46e5 0%, #6d28d9 42%, #1e1b4b 100%);
}

.yw-news-page .yw-news-hero__media img {
	width: 100%;
	height: 100%;
	min-height: 100%;
	object-fit: cover;
	display: block;
}

.yw-news-page .yw-news-hero__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	background: linear-gradient(145deg, #4f46e5 0%, #6d28d9 42%, #1e1b4b 100%);
}

.yw-news-page .yw-news-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(30, 27, 75, 0.08) 0%,
		rgba(30, 27, 75, 0.55) 48%,
		rgba(15, 23, 42, 0.92) 100%
	);
	pointer-events: none;
}

.yw-news-page .yw-news-hero__badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: rgba(99, 102, 241, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.28);
	backdrop-filter: blur(8px);
}

.yw-news-page .yw-news-hero__overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 22px 20px 20px;
	color: #fff;
}

.yw-news-page .yw-news-hero__cat {
	display: inline-block;
	margin-bottom: 2px;
	font-size: 13px;
	font-weight: 700;
	color: #a5b4fc;
}

.yw-news-page .yw-news-hero__title {
	margin: 6px 0 8px;
	font-size: clamp(20px, 2.4vw, 26px);
	font-weight: 800;
	line-height: 1.28;
	letter-spacing: -0.02em;
	color: #fff;
}

.yw-news-page .yw-news-hero__excerpt {
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.9);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.yw-news-page .yw-news-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.72);
}

.yw-news-page .yw-news-hero__meta span + span::before {
	content: "·";
	margin: 0 10px;
	color: rgba(255, 255, 255, 0.4);
}

/* 右侧无次级推荐时 */
.yw-news-spotlight--solo .yw-news-spotlight__main {
	min-height: 0;
}

.yw-news-spotlight--solo .yw-news-hero__link,
.yw-news-spotlight--solo .yw-news-hero__media,
.yw-news-spotlight--solo .yw-news-hero__placeholder {
	min-height: 300px;
	height: auto;
}

/* 次级横卡 */
.yw-news-page .yw-news-mini {
	height: 100%;
	min-height: 0;
	background: #fff;
	border: 1px solid #eceef3;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.yw-news-page .yw-news-mini:hover {
	border-color: #e0e7ff;
	box-shadow: 0 6px 18px rgba(79, 70, 229, 0.1);
}

.yw-news-page .yw-news-mini__link {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	height: 100%;
	padding: 10px 12px 10px 10px;
	color: inherit;
	text-decoration: none;
}

.yw-news-page .yw-news-mini__link:hover {
	text-decoration: none;
	background: transparent;
}

.yw-news-page .yw-news-mini__media {
	width: 88px;
	height: 88px;
	border-radius: 12px;
	overflow: hidden;
	flex-shrink: 0;
	aspect-ratio: 1 / 1;
	background: linear-gradient(135deg, #e0e7ff 0%, #fae8ff 100%);
}

.yw-news-page .yw-news-mini__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.yw-news-page .yw-news-mini__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e0e7ff 0%, #fae8ff 100%);
}

.yw-news-page .yw-news-mini__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	min-height: 88px;
	padding-right: 2px;
}

.yw-news-page .yw-news-mini__cat {
	font-size: 12px;
	color: var(--yw-primary);
	font-weight: 700;
	line-height: 1.2;
}

.yw-news-page .yw-news-mini__title {
	margin: 5px 0 6px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	color: #0f172a;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.yw-news-page .yw-news-mini__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 12px;
	color: #94a3b8;
}

/* Tabs */
.yw-news-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin: 0 0 16px;
	padding-bottom: 0;
	border-bottom: 1px solid var(--yw-border);
}

.yw-news-tabs__link {
	padding: 10px 2px;
	margin-bottom: -1px;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	font-size: 14px;
	font-weight: 600;
	color: #64748b;
	text-decoration: none;
	background: transparent;
}

.yw-news-tabs__link:hover {
	color: var(--yw-primary);
	text-decoration: none;
	background: transparent;
}

.yw-news-tabs__link.is-active {
	color: var(--yw-primary);
	border-bottom-color: var(--yw-primary);
	background: transparent;
}

/* 列表 */
.yw-news-feed-list {
	display: grid;
	gap: 14px;
}

.yw-news-feed {
	position: relative;
	background: #fff;
	border: 1px solid #ededed;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.yw-news-feed__link {
	display: grid;
	grid-template-columns: 168px 1fr;
	gap: 16px;
	padding: 14px 48px 14px 14px;
	color: inherit;
	text-decoration: none;
}

.yw-news-feed__link:hover {
	text-decoration: none;
	background: #fafafa;
}

.yw-news-feed__media img,
.yw-news-feed__ph {
	width: 168px;
	height: 112px;
	object-fit: cover;
	border-radius: 12px;
	display: block;
	background: linear-gradient(135deg, #e0e7ff, #fae8ff);
}

.yw-news-feed__title {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.35;
}

.yw-news-feed__excerpt {
	margin: 0 0 12px;
	color: var(--yw-muted);
	font-size: 13px;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.yw-news-feed__foot {
	margin-top: auto;
}

.yw-news-feed__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	font-size: 12px;
	color: var(--yw-muted);
}

.yw-news-feed__tag {
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	color: var(--yw-primary);
	background: #eef2ff;
}

.yw-news-feed__author {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	color: #475569;
}

.yw-news-feed__avatar {
	border-radius: 999px;
	width: 20px;
	height: 20px;
}

.yw-news-feed__views {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.yw-news-feed__save {
	position: absolute;
	top: 14px;
	right: 14px;
	border: 0;
	background: transparent;
	color: #94a3b8;
	padding: 4px;
	cursor: pointer;
	border-radius: 8px;
}

.yw-news-feed__save:hover {
	color: var(--yw-primary);
	background: #f1f5f9;
}

.yw-news-more {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}

.yw-news-more__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	border-radius: 999px;
	border: 1px solid var(--yw-border);
	background: #fff;
	color: #64748b;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.yw-news-more__btn:hover {
	color: var(--yw-primary);
	border-color: #c7d2fe;
	text-decoration: none;
}

.yw-news-more .page-numbers {
	display: none;
}

/* 右侧 · 24 小时热点（对齐设计稿） */
.yw-news-panel__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	margin-bottom: 14px;
}

.yw-news-panel__head .yw-panel__title {
	margin: 0;
	font-size: 17px;
	font-weight: 800;
	color: #0f172a;
	line-height: 1.3;
}

.yw-news-panel__more {
	font-size: 13px;
	font-weight: 600;
	color: var(--yw-primary);
	text-decoration: none;
}

.yw-news-panel__more:hover {
	color: var(--yw-primary-dark);
	text-decoration: none;
}

.yw-news-page .yw-hot-news {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.yw-news-page .yw-hot-news__item {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	gap: 10px 8px;
	align-items: start;
	font-size: 14px;
	line-height: 1.45;
}

.yw-news-page .yw-hot-news__n {
	display: block;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.45;
	color: var(--yw-primary);
	background: none;
	width: auto;
	height: auto;
	border-radius: 0;
	flex-shrink: 0;
}

.yw-news-page .yw-hot-news__n--gold,
.yw-news-page .yw-hot-news__n--silver,
.yw-news-page .yw-hot-news__n--bronze {
	color: var(--yw-primary);
	background: none;
}

.yw-news-page .yw-hot-news__link {
	color: #0f172a;
	text-decoration: none;
	line-height: 1.45;
	font-weight: 500;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.yw-news-page .yw-hot-news__link:hover {
	color: var(--yw-primary);
	text-decoration: none;
}

.yw-news-page .yw-hot-news__views {
	color: #94a3b8;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	padding-top: 1px;
}

.yw-news-calendar__month {
	margin: 0 0 8px;
	font-weight: 800;
	font-size: 14px;
}

.yw-news-calendar__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 4px;
	font-size: 11px;
	color: #94a3b8;
	text-align: center;
}

.yw-news-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	font-size: 12px;
	text-align: center;
}

.yw-news-calendar__cell {
	padding: 6px 0;
	border-radius: 8px;
	color: var(--yw-muted);
}

.yw-news-calendar__cell.is-active {
	background: #eef2ff;
	color: var(--yw-primary-dark);
	font-weight: 700;
}

.yw-news-calendar__cell.is-today {
	background: var(--yw-primary);
	color: #fff;
	font-weight: 700;
}

.yw-news-calendar__cell--empty {
	visibility: hidden;
}

.yw-news-cta {
	background: linear-gradient(145deg, #6366f1, #8b5cf6);
	color: #fff;
	border: 0;
	text-align: center;
	overflow: hidden;
}

.yw-news-cta__art img {
	margin: 0 auto 8px;
	display: block;
}

.yw-news-cta .yw-panel__title,
.yw-news-cta .yw-muted {
	color: rgba(255, 255, 255, 0.95);
}

.yw-news-cta .yw-muted {
	font-size: 13px;
	margin-bottom: 14px;
}

@media (max-width: 1280px) {
	.yw-news-layout {
		grid-template-columns: 240px minmax(0, 1fr);
	}
	.yw-news-aside--right {
		grid-column: 1 / -1;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.yw-news-layout {
		grid-template-columns: 1fr;
	}
	.yw-news-aside {
		position: static;
	}
	.yw-news-aside--right {
		grid-template-columns: 1fr;
	}
	.yw-news-spotlight,
	.yw-news-spotlight--with-stack {
		grid-template-columns: 1fr;
	}

	.yw-news-spotlight--with-stack .yw-news-spotlight__main,
	.yw-news-spotlight--with-stack .yw-news-spotlight__stack {
		min-height: 0;
	}

	.yw-news-spotlight__stack {
		grid-template-rows: none;
	}
}

@media (max-width: 640px) {
	.yw-news-feed__link {
		grid-template-columns: 80px minmax(0, 1fr);
		gap: 10px;
		padding: 10px;
	}
	.yw-news-feed__media img,
	.yw-news-feed__ph {
		width: 80px;
		height: 80px;
	}
	.yw-news-page .yw-news-mini__link {
		grid-template-columns: 76px minmax(0, 1fr);
		padding: 8px;
	}

	.yw-news-page .yw-news-mini__media {
		width: 76px;
		height: 76px;
	}

	.yw-news-page .yw-news-mini__body {
		min-height: 76px;
	}
}

/* 移动端：与全站分类胶囊统一（本文件在 mobile.css 之后加载） */
@media (max-width: 768px) {
	.yw-news-tabs-wrap {
		display: flex;
		align-items: center;
		gap: 10px;
		margin-bottom: 12px;
		min-width: 0;
	}

	.yw-news-tabs-wrap .yw-news-tabs {
		flex: 1;
		min-width: 0;
		margin: 0;
		padding: 3px;
		border: 1px solid var(--yw-cat-pill-border, #e2e8f0);
		border-radius: 999px;
		background: var(--yw-cat-pill-bg, #fff);
		box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		border-bottom: 0;
	}

	.yw-news-tabs-wrap .yw-news-tabs::-webkit-scrollbar {
		display: none;
	}

	.yw-news-tabs-wrap .yw-archive__filter-slot {
		flex-shrink: 0;
	}

	.yw-news-tabs__link {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
		min-height: 34px;
		padding: 6px 12px !important;
		margin: 0 !important;
		border: 0 !important;
		border-bottom: 0 !important;
		border-radius: 999px !important;
		background: transparent !important;
		box-shadow: none !important;
		font-size: 12px !important;
		font-weight: 600 !important;
		color: var(--yw-cat-pill-text, #64748b) !important;
		white-space: nowrap;
	}

	.yw-news-tabs__link.is-active {
		background: var(--yw-cat-pill-active-bg, linear-gradient(135deg, #eef2ff, #f5f3ff)) !important;
		color: var(--yw-cat-pill-active-text, var(--yw-primary-dark)) !important;
		font-weight: 700 !important;
		box-shadow: inset 0 0 0 1px var(--yw-cat-pill-active-ring, rgba(79, 70, 229, 0.14)) !important;
	}

	.yw-archive__filter-sheet .yw-news-tag-cloud {
		display: grid;
		gap: 4px;
	}

	.yw-archive__filter-sheet .yw-news-tag-cloud__item {
		display: flex;
		align-items: center;
		min-height: 44px;
		width: 100%;
		max-width: none;
		padding: 10px 12px !important;
		border: 0 !important;
		border-radius: 12px !important;
		font-size: 14px !important;
		font-weight: 500 !important;
		color: #334155 !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	.yw-archive__filter-sheet .yw-news-tag-cloud__item.is-active {
		background: var(--yw-cat-list-active-bg, linear-gradient(135deg, #eef2ff, #f5f3ff)) !important;
		color: var(--yw-cat-pill-active-text, var(--yw-primary-dark)) !important;
		font-weight: 700 !important;
		box-shadow: inset 0 0 0 1px var(--yw-cat-pill-active-ring, rgba(79, 70, 229, 0.14)) !important;
	}

	.yw-archive__filter-sheet .yw-news-tag-cloud__hash {
		width: 22px;
		height: 22px;
		display: inline-grid;
		place-items: center;
		border-radius: 8px;
		background: #f1f5f9;
		font-size: 12px;
		margin-right: 4px;
	}
}
