/*
 * 星火云前台视觉覆盖
 * 保持 NewsMemo/NewsMunch 父主题原文件不变。
 */

:root {
	--sparknest-ui-font: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

body,
button,
input,
select,
textarea,
.site--title,
.site--description,
.dt_navbar-mainmenu,
.exclusive-posts .title {
	font-family: var(--sparknest-ui-font);
}

/* Unified tool-first header. The WordPress channel keeps its own article
 * templates below this shell; the tools remain at the canonical root URLs. */
.sparknest-global-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: #ffffff;
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.1);
}

.sparknest-global-nav-wrap,
.sparknest-global-footer-inner {
	box-sizing: border-box;
	width: min(1400px, calc(100% - 32px));
	margin: 0 auto;
}

.sparknest-global-nav-wrap {
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 52px;
}

.sparknest-tool-brand {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex: 0 0 auto;
	color: #0f172a;
	font-size: 17px;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.sparknest-tool-brand strong {
	font-weight: 800;
}

.sparknest-tool-brand-mark {
	font-size: 19px;
}

.sparknest-global-nav {
	display: flex;
	align-items: center;
	gap: 2px;
	min-width: 0;
}

.sparknest-global-nav {
	flex: 1 1 auto;
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: thin;
}

.sparknest-global-nav a,
.sparknest-nav-menu > summary {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 10px;
	border-radius: 6px;
	color: #475569;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	list-style: none;
}

.sparknest-nav-menu > summary::-webkit-details-marker {
	display: none;
}

.sparknest-nav-menu > summary::after {
	content: "⌄";
	margin-left: 5px;
	font-size: 12px;
}

.sparknest-global-nav a:hover,
.sparknest-global-nav a:focus-visible,
.sparknest-nav-menu > summary:hover,
.sparknest-nav-menu > summary:focus-visible,
.sparknest-global-nav .is-current {
	color: #0f172a;
	background: #eef4ff;
	outline: 0;
}

.sparknest-nav-menu {
	position: relative;
	flex: 0 0 auto;
}

.sparknest-nav-panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	display: grid;
	min-width: 170px;
	padding: 7px;
	border: 1px solid #dbe4f0;
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.sparknest-nav-panel-tools {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	min-width: 340px;
}

.sparknest-nav-menu:not([open]) > .sparknest-nav-panel {
	display: none;
}

.sparknest-nav-menu:hover > .sparknest-nav-panel,
.sparknest-nav-menu:focus-within > .sparknest-nav-panel,
.sparknest-nav-menu[open] > .sparknest-nav-panel {
	display: grid;
}

.sparknest-nav-panel a {
	justify-content: flex-start;
	padding: 9px 10px;
}

.sparknest-blog-menu > summary {
	color: #0f172a;
	background: #eef4ff;
}

/* A single footer replaces NewsMemo's widgets and duplicate dark strip. */
.sparknest-global-footer {
	margin-top: 48px;
	background: #223766;
	color: #ffffff;
}

.sparknest-global-footer-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
	gap: 28px;
	padding: 30px 0;
}

.sparknest-footer-brand,
.sparknest-footer-description,
.sparknest-footer-links p {
	margin: 0;
}

.sparknest-footer-brand {
	font-size: 16px;
	font-weight: 700;
}

.sparknest-footer-description {
	max-width: 620px;
	margin-top: 10px;
	color: rgba(255, 255, 255, 0.76);
	font-size: 13px;
	line-height: 1.75;
}

.sparknest-footer-links {
	text-align: right;
	font-size: 13px;
	line-height: 1.7;
}

.sparknest-footer-links p + p {
	margin-top: 6px;
}

.sparknest-footer-links a {
	color: #ffffff;
	font-weight: 600;
	text-decoration: none;
}

.sparknest-footer-links a:hover,
.sparknest-footer-links a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.18em;
	outline: 0;
}

.sparknest-footer-records {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 4px 14px;
}

.sparknest-footer-records a,
.sparknest-footer-copyright {
	color: rgba(255, 255, 255, 0.75) !important;
	font-weight: 400 !important;
}

/* Desktop visual density is set to the requested 80%; mobile retains native
 * sizing and tap targets. This is intentional site styling, not browser zoom. */
@media (min-width: 1200px) {
	html {
		overflow-x: hidden;
	}

	body {
		zoom: 0.8;
	}
}

@media (max-width: 820px) {
	.sparknest-global-nav-wrap,
	.sparknest-global-footer-inner {
		width: min(100% - 24px, 1400px);
	}

	.sparknest-global-nav-wrap {
		gap: 11px;
		min-height: 48px;
	}

	.sparknest-tool-brand {
		font-size: 15px;
	}

	.sparknest-global-nav a,
	.sparknest-nav-menu > summary {
		min-height: 30px;
		padding: 0 8px;
		font-size: 13px;
	}

	.sparknest-global-footer-inner {
		grid-template-columns: 1fr;
		gap: 18px;
		padding: 24px 0;
	}

	.sparknest-footer-links {
		text-align: left;
	}

	.sparknest-footer-records {
		justify-content: flex-start;
	}
}

/* Keep long-form headings proportional to the reading text on every screen. */
body.single-post #dt-main .post-single .post-header .title {
	font-size: 27.5px !important;
	line-height: 1.25 !important;
}

body.single-post #dt-main article.post-content h2 {
	font-size: 22.5px !important;
	line-height: 1.25 !important;
}

body.single-post #dt-main article.post-content h3 {
	font-size: 15px !important;
	line-height: 1.25 !important;
}
