/* Module: main content / keep footer pinned after page content */
main {
	/* reserve header height so content starts below the fixed shell */
	margin-top: calc(var(--header-height, 64px) - 4px);
	flex: 1 0 auto;
	--content-max: min(var(--content-max-width, 1280px), calc(100vw - 2rem));
	width: var(--content-max);
	max-width: var(--content-max);
	margin-left: auto;
	margin-right: auto;
	--shell-side-gap: calc(var(--sidebar-width) + var(--layout-gap, 1rem));
	padding: 0 var(--shell-side-gap) 1rem;
	background: transparent;
	box-sizing: border-box;
	transition: padding 240ms ease;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
	align-items: start;
}

body > footer {
	margin-top: 0;
}

@media (max-width: 960px) {
	main {
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

@media (max-width: 760px) {
	main {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

main img {
	display: block;
	max-width: 100%;
	height: auto;
	margin-bottom: 0.75rem;
}

footer {
	width: 100%;
	box-sizing: border-box;
}

main a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	background: var(--secondary-bg);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
	color: inherit;
	text-decoration: none;
	line-height: 1.25;
	font-size: 1rem;
	transition: background 0.18s ease, border 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

main a:hover {
	background: var(--hover-bg);
	border-color: var(--border-color);
}

main a:active {
	transform: scale(0.98);
	background: var(--active-bg);
	border-color: var(--border-color);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04) inset;
}

main > :first-child { margin-top: 0; }
main > section:first-child > :first-child { margin-top: 0; }
main > section:first-of-type { margin-top: 0; }
main > section:first-of-type h1:first-child,
main > section:first-of-type h2:first-child,
main > section:first-of-type h3:first-child { margin-top: 0; }

.cache-notice {
	display: none;
	padding: 0.75rem 0.9rem;
	padding-right: 2.6rem;
	background: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	box-shadow: 0 12px 30px var(--shadow-color);
	color: var(--text-color);
}
.cache-notice.show { display: block; }
.cache-notice__title { font-weight: 600; margin-bottom: 0.2rem; }
.cache-notice__desc { font-size: 0.95rem; line-height: 1.4; margin-bottom: 0.35rem; }
.cache-notice__actions { display: flex; gap: 0.45rem; align-items: center; justify-content: flex-end; margin-top: 0.35rem; }
.cache-notice__refresh {
	background: var(--secondary-bg);
	color: var(--text-color);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 0.4rem 0.85rem;
	cursor: pointer;
	transition: background 0.18s ease, border 0.18s ease, transform 0.18s ease;
}
.cache-notice__refresh:hover { background: var(--hover-bg); }
.cache-notice__refresh:active { transform: scale(0.98); }

@media (max-width: 640px) {
	.cache-notice { max-width: 100%; }
}

/* 首页专项布局 */
.hero-pane {
	background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), rgba(57, 207, 141, 0.15));
	border: 1px solid var(--border-color);
	border-radius: 24px;
	padding: 2.75rem 2.5rem;
	box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
	backdrop-filter: blur(10px);
	color: var(--text-color);
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hero-eyebrow {
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-muted, #6b7280);
}

.hero-lead {
	max-width: 54ch;
	line-height: 1.6;
	font-size: 1.08rem;
	color: var(--text-muted, #6b7280);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.hero-btn {
	padding: 0.75rem 1.25rem;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 600;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	text-decoration: none;
	white-space: nowrap;
	flex: 1 1 180px;
	min-width: 120px;
	text-align: center;
}

.hero-btn.primary {
	background: var(--primary-color, #4A90E2);
	color: #fff;
	box-shadow: 0 12px 24px rgba(74, 144, 226, 0.3);
}

.hero-btn.secondary {
	background: var(--secondary-bg);
	color: var(--text-color);
	border-color: var(--border-color);
}

.hero-btn.ghost {
	color: var(--text-color);
	border-color: var(--border-color);
	background: transparent;
}

.hero-btn:hover {
	transform: translateY(-2px);
}

.hero-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.hero-meta strong {
	display: block;
	font-size: 1rem;
	color: var(--text-color);
	margin-bottom: 0.2rem;
}

.hero-meta span {
	font-size: 0.9rem;
	color: var(--text-muted, #6b7280);
}

.section-heading h2 {
	margin-bottom: 0.25rem;
}

.summary {
	background: var(--card-bg);
	border-radius: 20px;
	border: 1px solid var(--border-color);
	padding: 2rem;
	box-shadow: 0 15px 40px rgba(15, 23, 42, 0.1);
}

.summary-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
}

.summary-grid li {
	background: var(--secondary-bg);
	border-radius: 16px;
	padding: 1.25rem;
	border: 1px solid var(--border-color);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.summary-grid h3 {
	margin: 0 0 0.35rem;
	font-size: 1rem;
}

.summary-grid p {
	margin: 0;
	line-height: 1.5;
	color: var(--text-muted, #6b7280);
}

.spotlights {
	background: transparent;
}

.spotlight-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
}

.spotlight-card {
	background: var(--card-bg);
	border-radius: 18px;
	padding: 1.5rem;
	border: 1px solid var(--border-color);
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.spotlight-tag {
	font-size: 0.75rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--primary-color, #4A90E2);
}

.spotlight-card h3 {
	margin: 0;
	font-size: 1.15rem;
}

.spotlight-card p {
	margin: 0;
	color: var(--text-muted, #6b7280);
	line-height: 1.5;
}

.spotlight-link {
	margin-top: auto;
	text-decoration: none;
	color: var(--primary-color, #4A90E2);
	font-weight: 600;
}

.spotlight-link:hover {
	text-decoration: underline;
}

.timeline {
	background: var(--secondary-bg);
	border-radius: 20px;
	border: 1px solid var(--border-color);
	padding: 2rem;
	box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
}

.timeline ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.timeline li {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1rem;
	align-items: center;
}

.timeline-year {
	font-size: 2rem;
	font-weight: 700;
	color: var(--primary-color, #4A90E2);
}

.timeline p {
	margin: 0;
	color: var(--text-muted, #6b7280);
	line-height: 1.5;
}

@media (max-width: 960px) {
	.hero-pane {
		padding: 2.25rem 1.75rem;
	}

	.hero-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.hero-btn {
		flex: 1 1 auto;
		min-width: 0;
	}

	.timeline li {
		grid-template-columns: 1fr;
	}
}
.code-block {
	position: relative;
	background: #23272e;
	border-radius: 8px;
	padding: 1.5em 1em 1em 3.5em;
	color: #fff;
	font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
	overflow-x: auto;
	margin: 1.5em 0;
}

.code-block .code-lines {
	counter-reset: line;
}

.code-block .code-line {
	display: block;
	padding-left: 0.5em;
	position: relative;
}

.code-block .code-line::before {
	counter-increment: line;
	content: counter(line);
	display: inline-block;
	width: 2em;
	text-align: right;
	margin-right: 1em;
	color: #b0b0b0;
	background: #2d313a;
	border-radius: 4px;
	font-size: 0.95em;
	position: absolute;
	left: -2.8em;
	top: 0;
	height: 100%;
	padding-right: 0.5em;
}

.code-block .copy-btn {
	position: absolute;
	top: 0.7em;
	right: 1em;
	background: rgba(180, 180, 180, 0.3);
	border: none;
	border-radius: 6px;
	padding: 0.3em 0.7em;
	cursor: pointer;
	transition: background 0.2s;
	z-index: 2;
	display: flex;
	align-items: center;
}

.code-block .copy-btn:hover {
	background: rgba(180, 180, 180, 0.5);
}

.code-block .copy-btn .fluent-icon {
	font-family: 'FluentSystemIcons-Regular';
	font-size: 1.2em;
	color: #fff;
	pointer-events: none;
}

.global-copy-toast {
	position: fixed;
	left: 50%;
	transform: translate(-50%, 12px);
	bottom: 24px;
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.75rem 1.25rem;
	border-radius: 14px;
	background: rgba(16, 185, 129, 0.95);
	color: #fff;
	font-weight: 600;
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.35);
	opacity: 0;
	transform-origin: bottom center;
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
	z-index: 2200;
}

.global-copy-toast.show {
	opacity: 1;
	transform: translate(-50%, 0);
	pointer-events: auto;
}

.global-copy-toast.global-copy-toast--error {
	background: rgba(239, 68, 68, 0.95);
}

.global-copy-toast.global-copy-toast--success {
	background: rgba(16, 185, 129, 0.95);
}

.global-toast-icon {
	display: inline-flex;
	font-size: 1.1rem;
	line-height: 1;
}

.global-toast-message {
	max-width: 260px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.global-toast-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	margin-left: auto;
	pointer-events: auto;
}
