/* ==========================================================================
   Nexus Blog — 科技蓝紫渐变风格
   这里放 theme.json 里不便维护的细节样式，随子主题独立加载。
   ========================================================================== */

/* --- 顶部一条渐光线，强化科技感 --- */
.dsh-header::before {
	content: "";
	display: block;
	height: 2px;
	width: 100%;
	background-image: linear-gradient(90deg, #22D3EE 0%, #6366F1 45%, #A855F7 100%);
}

/* --- 文章卡片：顶部悬停渐变描边 --- */
.dsh-post-item {
	position: relative;
	overflow: hidden;
}
.dsh-post-item::after {
	content: "";
	position: absolute;
	inset: 0 auto auto 0;
	height: 2px;
	width: 0;
	background-image: linear-gradient(90deg, #6366F1, #A855F7);
	transition: width .3s ease;
}
.dsh-post-item:hover::after {
	width: 100%;
}

/* --- 首页 Hero --- */
.dsh-hero::after {
	content: "";
	position: absolute;
	right: -80px;
	bottom: -120px;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	background-image: radial-gradient(circle, rgba(168, 85, 247, .45) 0%, transparent 65%);
	filter: blur(18px);
	pointer-events: none;
}
.dsh-hero > * {
	position: relative;
	z-index: 1;
}

/* --- 标题渐变文字（用于 Hero 主标题） --- */
.dsh-hero h1 {
	background-image: linear-gradient(100deg, #EEF2FF 0%, #A5B4FC 45%, #C084FC 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* --- 正文可读性 --- */
.entry-content p,
.wp-block-post-content p {
	line-height: 1.85;
}
.entry-content h2,
.wp-block-post-content h2 {
	margin-top: 2.5rem;
	padding-left: .85rem;
	border-left: 4px solid transparent;
	border-image: linear-gradient(180deg, #6366F1, #A855F7) 1;
}
.entry-content img,
.wp-block-post-content img {
	border-radius: 14px;
}

/* --- 行内代码 --- */
.entry-content :not(pre) > code,
.wp-block-post-content :not(pre) > code {
	background: #161E33;
	border: 1px solid #243049;
	border-radius: 6px;
	padding: .1rem .4rem;
	font-size: .9em;
	color: #C4B5FD;
}

/* --- 引用块渐变左边线 --- */
.wp-block-quote {
	border-left: 3px solid transparent !important;
	border-image: linear-gradient(180deg, #6366F1, #A855F7) 1;
}

/* --- 表格 --- */
.entry-content table,
.wp-block-post-content table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid #243049;
	border-radius: 12px;
	overflow: hidden;
}
.entry-content th,
.wp-block-post-content th {
	background: #161E33;
	text-align: left;
	padding: .7rem .9rem;
	border-bottom: 1px solid #243049;
}
.entry-content td,
.wp-block-post-content td {
	padding: .7rem .9rem;
	border-bottom: 1px solid #1b2437;
}

/* --- 分页 / 导航按钮 --- */
.wp-block-query-pagination a,
.wp-block-post-navigation-link a {
	display: inline-block;
	padding: .45rem .9rem;
	border: 1px solid #243049;
	border-radius: 10px;
	background: #0F1524;
	transition: border-color .2s ease, color .2s ease;
}
.wp-block-query-pagination a:hover,
.wp-block-post-navigation-link a:hover {
	border-color: #6366F1;
	color: #C7D2FE;
	text-decoration: none;
}

/* --- 搜索框 --- */
.wp-block-search__inside-wrapper {
	border: 1px solid #243049;
	border-radius: 12px;
	background: #0F1524;
	padding: .25rem;
}
.wp-block-search__input {
	background: transparent !important;
	border: none !important;
}

/* --- 页脚链接 --- */
.dsh-footer a {
	color: #94A3B8;
}
.dsh-footer a:hover {
	color: #C084FC;
}

/* --- 移动端微调 --- */
@media (max-width: 782px) {
	:root {
		--wp--preset--spacing--70: 3rem;
		--wp--preset--spacing--60: 2rem;
	}
	.dsh-hero {
		padding-left: 1.25rem !important;
		padding-right: 1.25rem !important;
		border-radius: 16px;
	}
	.dsh-post-item {
		padding: 1.15rem;
	}
}

/* --- 无障碍：减少动效偏好 --- */
@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   AI 撰写标注
   读者可见、不打断阅读，但足够显眼，不会被误认为人工撰写。
   ========================================================================== */

.dsh-ai-notice {
	margin-top: 2.5rem;
	padding: 1rem 1.15rem;
	display: flex;
	gap: .8rem;
	align-items: flex-start;
	border: 1px dashed rgba(168, 85, 247, .55);
	border-radius: 14px;
	background-image: linear-gradient(135deg, rgba(99, 102, 241, .10) 0%, rgba(168, 85, 247, .10) 100%);
}

.dsh-ai-notice__badge {
	flex: 0 0 auto;
	display: inline-block;
	padding: .2rem .6rem;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .03em;
	white-space: nowrap;
	color: #fff;
	background-image: linear-gradient(135deg, #6366F1 0%, #A855F7 100%);
}

.dsh-ai-notice__text {
	font-size: .875rem;
	line-height: 1.7;
	color: var(--wp--preset--color--muted);
}

/* 列表页摘要后面那行小字 */
.dsh-ai-mark {
	display: inline-block;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .02em;
	color: #C084FC;
	white-space: nowrap;
}

/* AI 撰写文章的卡片角标
   core/post-template 把 post_class 的 dsh-ai-author 加在 <li> 上，
   内层卡片 div 自带 dsh-post-item，所以角标挂在 <li> 上。 */
li.dsh-ai-author {
	position: relative;
}

li.dsh-ai-author::before {
	content: "AI 生成";
	position: absolute;
	top: 0;
	right: 0;
	padding: .22rem .6rem;
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .04em;
	color: #fff;
	background-image: linear-gradient(135deg, #6366F1 0%, #A855F7 100%);
	border-bottom-left-radius: 10px;
	border-top-right-radius: 15px;
	z-index: 2;
}

/* 给角标让出空间，避免压住卡片右上角内容 */
li.dsh-ai-author > .dsh-post-item {
	padding-top: 1.9rem;
}

/* 页脚备案信息与署名 */
.dsh-icp {
	margin-top: .35rem;
	font-size: .8125rem;
	line-height: 1.9;
	color: var(--wp--preset--color--muted);
	text-align: center;
}
.dsh-icp a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	border-bottom: 1px dotted rgba(148, 163, 184, .6);
}
.dsh-icp a:hover {
	color: var(--wp--preset--color--accent);
	border-bottom-color: var(--wp--preset--color--accent);
}
.dsh-icp strong {
	color: #C084FC;
	font-weight: 700;
}
.dsh-icp__sep {
	margin: 0 .5rem;
	opacity: .55;
}

/* ============================================================================
   摘要专栏（page-digest-column 模板）
   摘要按时间从新到旧排列，左侧加一条竖线强化"时间轴"观感
   ========================================================================== */

.dsh-digest-item {
	padding-left: 1.4rem;
	border-left: 3px solid rgba(99, 102, 241, .35);
	border-top: 0;
	border-right: 0;
	border-bottom: 0;
	border-radius: 0 12px 12px 0;
	transition: border-left-color .22s ease, background-color .22s ease;
}

.dsh-digest-item:hover {
	border-left-color: var(--wp--preset--color--accent);
	background-color: rgba(99, 102, 241, .05);
}

/* 日期与来源标签行 */
.dsh-digest-meta {
	gap: .45rem;
	align-items: center;
	margin-bottom: .35rem;
}

.dsh-digest-meta .dsh-tag,
.dsh-digest-meta .wp-block-post-date {
	margin: 0;
}

/* 摘要正文的行距略收紧，列表感更强 */
.dsh-digest-item .wp-block-post-excerpt__excerpt {
	line-height: 1.75;
	color: var(--wp--preset--color--muted);
}

/* 专栏内标题不要太大，避免每条占满屏 */
.dsh-digest-item .wp-block-post-title {
	margin: .1rem 0 .35rem;
	line-height: 1.35;
}

.dsh-digest-item .wp-block-post-title a {
	text-decoration: none;
}

.dsh-digest-item .wp-block-post-title a:hover {
	color: var(--wp--preset--color--accent);
}

@media (max-width: 600px) {
	.dsh-digest-item {
		padding-left: 1rem;
		border-left-width: 2px;
	}
}

/* ---- 来源筛选条（由 mu-plugin 输出到专栏页）---- */

.dsh-source-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .45rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.dsh-source-filter__label {
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--wp--preset--color--muted);
	margin-right: .25rem;
}

.dsh-source-chip {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .3rem .75rem;
	border-radius: 999px;
	font-size: .8125rem;
	font-weight: 600;
	line-height: 1.6;
	text-decoration: none;
	color: #C7D2FE;
	border: 1px solid rgba(99, 102, 241, .35);
	background: rgba(99, 102, 241, .10);
	transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.dsh-source-chip:hover {
	color: #fff;
	border-color: rgba(99, 102, 241, .7);
	background: rgba(99, 102, 241, .28);
}

/* 当前所在筛选（「全部」） */
.dsh-source-chip--on {
	color: #fff;
	border-color: transparent;
	background-image: linear-gradient(135deg, #6366F1 0%, #A855F7 100%);
}

.dsh-source-chip__n {
	font-size: .6875rem;
	font-weight: 700;
	padding: 0 .35rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, .16);
	color: inherit;
}

/* ---- 条目里的日期与来源，用颜色区分 ---- */

.dsh-digest-meta .dsh-tag--date {
	color: var(--wp--preset--color--muted);
	border-color: var(--wp--preset--color--border);
	background: transparent;
	font-variant-numeric: tabular-nums;
}

.dsh-digest-meta .dsh-tag--source {
	color: #A5B4FC;
	border-color: rgba(99, 102, 241, .45);
	background: rgba(99, 102, 241, .14);
}

.dsh-digest-meta .dsh-tag--source a {
	color: inherit;
	text-decoration: none;
}

.dsh-digest-meta .dsh-tag--source a:hover {
	color: #fff;
}

@media (max-width: 600px) {
	.dsh-source-filter {
		gap: .35rem;
	}
	.dsh-source-chip {
		padding: .25rem .6rem;
		font-size: .75rem;
	}
	.dsh-source-filter__label {
		width: 100%;
		margin: 0 0 .2rem;
	}
}

@media (max-width: 600px) {
	.dsh-ai-notice {
		flex-direction: column;
		gap: .5rem;
	}
	.dsh-icp__sep {
		display: block;
		height: 0;
		overflow: hidden;
		margin: 0;
	}
	.dsh-icp {
		line-height: 1.7;
	}
}
