/* 晨安校园官网基础样式 */
:root {
	--brand: #1a5cff;
	--text: #1f2937;
	--muted: #6b7280;
	--bg: #f7f9fc;
	--card: #ffffff;
	--line: #e5e7eb;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
	color: var(--text);
	background: var(--bg);
	line-height: 1.7;
	overflow-x: hidden;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

a {
	color: var(--brand);
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

a:hover {
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
}

.skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 8px 12px;
	border-radius: 6px;
	background: #fff;
	color: #0b1b3a;
	transform: translateY(-150%);
	transition: transform .15s ease;
}

.skip-link:focus {
	transform: translateY(0);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #0b1b3a;
	color: #fff;
}

.site-header-inner,
.site-main,
.site-footer-inner {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 64px;
	gap: 16px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	font-weight: 700;
	font-size: 18px;
}

.brand img {
	width: 36px;
	height: 36px;
	object-fit: contain;
}

.nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.nav a {
	color: rgba(255, 255, 255, .88);
}

.nav a:hover {
	color: #fff;
}

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 72px;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 8px;
	background: transparent;
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle-icon {
	position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
	position: absolute;
	left: 0;
	content: "";
}

.nav-toggle-icon::before {
	top: -6px;
}

.nav-toggle-icon::after {
	top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
	background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
	top: 0;
	transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
	top: 0;
	transform: rotate(-45deg);
}

.nav a:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible,
.card a:focus-visible,
.article-pager-item:focus-visible,
.related-item:focus-visible {
	outline: 3px solid #fbbf24;
	outline-offset: 3px;
}

.hero {
	padding: 72px 0 56px;
	background-color: #0b1b3a;
	background-image: linear-gradient(135deg, #0b1b3a 0%, #1a5cff 100%);
	color: #fff;
}

.hero h1 {
	margin: 0 0 12px;
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1.25;
}

.hero p {
	margin: 0;
	max-width: 720px;
	color: rgba(255, 255, 255, .88);
	font-size: 18px;
}

.hero-actions {
	margin-top: 24px;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border-radius: 8px;
	border: 1px solid transparent;
	font-weight: 600;
	text-align: center;
	touch-action: manipulation;
}

.btn-primary {
	background: #fff;
	color: #0b1b3a;
}

.btn-ghost {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, .45);
}

.section {
	padding: 48px 0;
}

.www-code-block {
	min-width: 0;
}

.section-title {
	margin: 0 0 20px;
	font-size: 28px;
}

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}

.card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.card h3 {
	margin: 0 0 8px;
	font-size: 18px;
}

.card p {
	margin: 0;
	color: var(--muted);
}

.meta {
	color: var(--muted);
	font-size: 13px;
	margin-bottom: 8px;
}

.article-body {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 28px;
}

.article-body h1 {
	margin-top: 0;
}

.article-body img {
	border-radius: 8px;
}

.site-footer {
	margin-top: 0;
	padding: 28px 0;
	background: #0b1b3a;
	color: rgba(255, 255, 255, .78);
	font-size: 14px;
}

.site-footer a {
	color: rgba(255, 255, 255, .88);
}

.section-sub {
	margin: -8px 0 20px;
	color: var(--muted);
}

.stats-grid .stat-card {
	text-align: center;
}

.stat-value {
	font-size: 28px;
	font-weight: 700;
	color: var(--brand);
}

.stat-label {
	color: var(--muted);
}

.product-card {
	transition: transform .15s ease, box-shadow .15s ease;
}

.product-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
	text-decoration: none;
}

.faq-list {
	display: grid;
	gap: 12px;
}

.faq-item h3 {
	margin: 0 0 8px;
	font-size: 16px;
}

.cta-section {
	margin: 0;
	padding: 48px 0;
	background-color: #0b1b3a;
	background-image: none;
	color: #fff;
}

.cta-section h2 {
	margin: 0 0 10px;
	font-size: 28px;
}

.cta-section p {
	margin: 0;
	color: rgba(255, 255, 255, .85);
}

.subsite-hero {
	padding: 64px 0 48px;
	background: linear-gradient(120deg, #102a56, #2563eb);
	color: #fff;
}

.subsite-hero h1 {
	margin: 0 0 12px;
	font-size: clamp(26px, 4vw, 40px);
}

.subsite-hero p {
	margin: 0;
	max-width: 720px;
	opacity: .9;
}

.page-head {
	padding: 40px 0 8px;
}

.page-head h1 {
	margin: 0 0 8px;
	font-size: clamp(24px, 3vw, 32px);
}

.page-head p {
	margin: 0;
	color: #64748b;
}

.prose,
.contact-card {
	line-height: 1.8;
}

.info-list {
	margin: 0;
	padding-left: 22px;
}

.info-list li {
	margin: 8px 0;
	overflow-wrap: anywhere;
}

.empty-state {
	padding: 48px 0;
	text-align: center;
	color: #94a3b8;
}

.article-list {
	display: grid;
	gap: 14px;
}

.article-list-item {
	padding: 18px 22px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.article-list-item:hover {
	border-color: #2563eb;
	box-shadow: 0 4px 14px rgba(37, 99, 235, .1);
}

.article-list-item h2 {
	margin: 0 0 8px;
	font-size: 18px;
}

.article-list-item h2 a {
	color: #0f172a;
	text-decoration: none;
}

.article-list-item h2 a:hover {
	color: #2563eb;
}

.article-list-item p {
	margin: 0 0 8px;
	color: #64748b;
	font-size: 14px;
	line-height: 1.7;
}

.article-detail {
	max-width: 820px;
	margin: 0 auto;
	padding: 32px 0 8px;
}

.article-header .breadcrumb {
	margin: 0 0 10px;
	font-size: 13px;
}

.article-header .breadcrumb a {
	color: #2563eb;
	text-decoration: none;
}

.article-header h1 {
	margin: 0 0 12px;
	font-size: clamp(24px, 3.4vw, 34px);
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.article-meta {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	font-size: 13px;
	color: #94a3b8;
}

.article-cover {
	margin: 20px 0 0;
}

.article-cover img {
	width: 100%;
	border-radius: 12px;
}

.article-content {
	margin-top: 24px;
	font-size: 16px;
	line-height: 1.9;
	color: #1f2937;
	overflow-wrap: break-word;
}

.article-content div,
.article-content figure {
	max-width: 100%;
}

.article-content img,
.article-content video {
	max-width: 100%;
	height: auto !important;
	border-radius: 8px;
}

.article-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 16px 0;
}

.article-content td,
.article-content th {
	border: 1px solid #e2e8f0;
	padding: 8px 12px;
}

.article-content blockquote {
	margin: 16px 0;
	padding: 10px 18px;
	border-left: 4px solid #2563eb;
	background: #f1f5f9;
	border-radius: 0 8px 8px 0;
	color: #475569;
}

.article-content pre {
	padding: 14px 16px;
	background: #0f172a;
	color: #e2e8f0;
	border-radius: 10px;
	overflow: auto;
	font-size: 14px;
}

.article-pager {
	display: flex;
	gap: 16px;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid #e2e8f0;
}

.article-pager-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 18px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.article-pager-item:hover {
	border-color: #2563eb;
	box-shadow: 0 4px 14px rgba(37, 99, 235, .12);
}

.article-pager-item.next {
	text-align: right;
}

.article-pager-item.placeholder {
	border: none;
	pointer-events: none;
}

.article-pager-label {
	font-size: 12px;
	color: #64748b;
}

.article-pager-title {
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
}

.related-section .section-title {
	margin: 0 0 16px;
	font-size: 22px;
}

.related-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
}

.related-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.related-item:hover {
	border-color: #2563eb;
	box-shadow: 0 4px 14px rgba(37, 99, 235, .12);
}

.related-item-title {
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
}

.related-item-summary {
	font-size: 13px;
	color: #64748b;
	line-height: 1.6;
}

.related-item time {
	font-size: 12px;
	color: #94a3b8;
}

@media (max-width: 768px) {
	.site-header-inner {
		position: relative;
		flex-wrap: wrap;
		min-height: 60px;
		padding: 8px 0;
	}

	.brand {
		max-width: calc(100% - 88px);
		font-size: 17px;
	}

	.brand span {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.brand img {
		flex: 0 0 auto;
		width: 34px;
		height: 34px;
	}

	.js .nav-toggle {
		display: inline-flex;
		margin-left: auto;
	}

	.nav {
		display: flex;
		width: 100%;
		flex-direction: column;
		gap: 0;
		padding: 6px 0 4px;
		border-top: 1px solid rgba(255, 255, 255, .12);
	}

	.js .nav {
		display: none;
	}

	.js .nav.is-open {
		display: flex;
	}

	.nav a {
		display: flex;
		align-items: center;
		min-height: 44px;
		padding: 8px 4px;
		border-bottom: 1px solid rgba(255, 255, 255, .08);
		font-size: 16px;
	}

	.hero {
		padding: 40px 0 34px;
	}

	.hero h1 {
		font-size: clamp(26px, 8vw, 34px);
	}

	.hero p {
		font-size: 16px;
		line-height: 1.75;
	}

	.section {
		padding: 28px 0;
	}

	.section-title,
	.cta-section h2 {
		font-size: 24px;
		line-height: 1.35;
	}

	.card-grid,
	.related-list {
		grid-template-columns: minmax(0, 1fr);
	}

	.card,
	.article-list-item {
		padding: 16px;
	}

	.stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cta-section,
	.subsite-hero {
		padding: 36px 0;
	}

	.page-head {
		padding-top: 28px;
	}

	.article-detail {
		padding-top: 24px;
	}

	.article-content {
		font-size: 16px;
		line-height: 1.85;
	}

	.article-content table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		white-space: nowrap;
	}

	.article-content pre {
		max-width: 100%;
		-webkit-overflow-scrolling: touch;
	}

	.article-content iframe {
		max-width: 100%;
	}

	.info-list {
		padding-left: 20px;
	}

	.site-footer {
		margin-top: 0;
		padding: 24px 0;
	}

	.site-footer p {
		margin: 6px 0;
		overflow-wrap: anywhere;
	}

	.article-pager {
		flex-direction: column;
		gap: 10px;
		margin-top: 28px;
	}

	.article-pager-item.next {
		text-align: left;
	}

	.article-pager-item.placeholder {
		display: none;
	}
}

@media (max-width: 420px) {
	.site-header-inner,
	.site-main,
	.site-footer-inner {
		width: min(100% - 24px, 1120px);
	}

	.nav-toggle-text {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.nav-toggle {
		min-width: 44px;
		padding: 8px;
	}

	.brand {
		max-width: calc(100% - 56px);
	}

	.hero {
		padding: 32px 0 28px;
	}

	.hero-actions {
		flex-direction: column;
		gap: 10px;
	}

	.hero-actions .btn {
		width: 100%;
	}

	.section {
		padding: 24px 0;
	}

	.stats-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.stat-value {
		font-size: 26px;
	}

	.article-header h1 {
		font-size: 25px;
	}

	.article-meta {
		gap: 6px 12px;
	}

	.article-content blockquote {
		margin-left: 0;
		margin-right: 0;
		padding: 10px 14px;
	}
}

.contact-grid {
	display: grid;
	grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
	gap: 20px;
	align-items: start;
}

.contact-info p {
	margin: 0 0 12px;
}

.contact-info strong {
	display: inline-block;
	min-width: 48px;
	color: var(--muted);
	font-weight: 600;
	margin-right: 8px;
}

.inquiry-form h2 {
	margin: 0 0 8px;
	font-size: 22px;
}

.inquiry-sub {
	margin: 0 0 16px;
	color: var(--muted);
}

.inquiry-form label {
	display: block;
	margin-bottom: 14px;
}

.inquiry-form label span {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 14px;
}

.inquiry-form input,
.inquiry-form select,
.inquiry-form textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 8px;
	font: inherit;
	background: #fff;
}

.inquiry-form textarea {
	min-height: 108px;
	resize: vertical;
}

.inquiry-hp {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

.inquiry-ok {
	background: #ecfdf5;
	color: #047857;
	border-radius: 8px;
	padding: 10px 12px;
	margin-bottom: 14px;
}

.btn-submit {
	background: var(--brand);
	color: #fff;
	border: none;
	cursor: pointer;
}

.btn-submit:hover {
	text-decoration: none;
	filter: brightness(1.05);
}

.inquiry-form .btn-submit {
	width: 100%;
	margin-top: 4px;
}

.btn-ghost-dark {
	background: #fff;
	color: var(--text);
	border-color: var(--line);
}

@media (max-width: 768px) {
	.contact-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* =========================================================
 * 装修页（设计器预览 / 真实预览 / 发布）区块上下强制紧贴
 * 放在文件末尾，覆盖前文 .section / .hero / .cta-section 的上下间距
 * ========================================================= */
main.page-blocks {
	display: flex;
	flex-direction: column;
	gap: 0;
	background: #fff;
}
main.page-blocks > .www-block,
main.page-blocks > section {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0 !important;
	box-sizing: border-box;
	flex: 0 0 auto;
}
/* 普通内容块：外层零上下内边距，宽度交给内部 .site-main */
main.page-blocks > .www-block--content {
	padding: 0 !important;
	background: #fff;
}
main.page-blocks > .www-block--content > .site-main {
	padding-top: 0;
	padding-bottom: 0;
}
/* 首屏 / 行动区：仅保留块内内容留白，块与块之间仍无外间距 */
main.page-blocks > .www-block--hero,
main.page-blocks > .hero {
	padding: 36px 0 !important;
}
main.page-blocks > .www-block--cta,
main.page-blocks > .cta-section {
	padding: 28px 0 !important;
	margin: 0 !important;
}
main.page-blocks > .www-block--code,
main.page-blocks > .www-code-block {
	padding: 0 !important;
	margin: 0 !important;
}
/* 页脚贴紧最后一个区块 */
main.page-blocks + .site-footer,
body > .site-footer {
	margin-top: 0 !important;
}

@media (max-width: 768px) {
	main.page-blocks > .www-block--hero,
	main.page-blocks > .hero {
		padding: 28px 0 !important;
	}
	main.page-blocks > .www-block--cta,
	main.page-blocks > .cta-section {
		padding: 24px 0 !important;
	}
}
