/* 文章页公共样式（坐火车指南、法律声明等共用） */

main {
	gap: 12px; /* 文章页元素较多，收紧全局 24px 间距 */
}

.info {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	padding: 10px 16px;
	background-color: #fff; /* 与 contentBox 卡片保持一致 */
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
	font-size: 14px;
	color: var(--neutral-700);
}

/* 标题文字：允许在返回按钮之后换行，避免长标题撑破标题栏 */
.articleTitle {
	flex: 1;
	min-width: 0;
}

/* 标题栏里的返回按钮 */
.backButton {
	flex-shrink: 0;
	margin-right: 12px;
	padding: 4px 10px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--primary-color);
	background-color: var(--neutral-100);
	border-radius: var(--radius-sm);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.backButton:hover,
.backButton:visited:hover {
	color: #fff;
	background-color: var(--primary-color);
}

.contentBox {
	margin: 0;
	padding: 24px;
	background-color: #fff;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	font-size: 16px;
	line-height: 1.8; /* 提升行高，优化阅读体验 */
	color: var(--neutral-900);
	overflow-wrap: break-word;
}

/* Markdown 渲染内容 */
.contentBox > :first-child {
	margin-top: 0;
}

.contentBox > :last-child {
	margin-bottom: 0;
}

.contentBox h1,
.contentBox h2,
.contentBox h3,
.contentBox h4,
.contentBox h5,
.contentBox h6 {
	margin: 1.4em 0 0.6em;
	font-weight: 600;
	line-height: 1.35;
	color: var(--neutral-900);
}

.contentBox h1 {
	font-size: 26px;
}

.contentBox h2 {
	font-size: 22px;
}

.contentBox h3 {
	font-size: 18px;
}

.contentBox h4 {
	font-size: 16px;
}

.contentBox p {
	margin: 0.6em 0;
}

/* 恢复被全局重置掉的列表标记 */
.contentBox ul,
.contentBox ol {
	margin: 0.6em 0;
	padding-left: 1.6em;
}

.contentBox ul {
	list-style: disc;
}

.contentBox ul ul {
	list-style: circle;
}

.contentBox ol {
	list-style: decimal;
}

.contentBox li {
	margin: 0.25em 0;
}

.contentBox li::marker {
	color: var(--primary-color);
}

.contentBox strong {
	font-weight: 600;
}

.contentBox a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.contentBox blockquote {
	margin: 1em 0;
	padding: 12px 16px;
	background-color: var(--neutral-100);
	border-left: 4px solid var(--primary-color);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	color: var(--neutral-700);
}

.contentBox blockquote > :first-child {
	margin-top: 0;
}

.contentBox blockquote > :last-child {
	margin-bottom: 0;
}

.contentBox img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	margin: 16px auto;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
}

.contentBox hr {
	height: 1px;
	margin: 1.5em 0;
	border: none;
	background-color: var(--neutral-200);
}

.contentBox code {
	padding: 2px 6px;
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
	font-size: 0.9em;
	background-color: var(--neutral-100);
	border-radius: var(--radius-sm);
}

.contentBox table {
	display: block;
	width: 100%;
	margin: 1em 0;
	border-collapse: collapse;
	overflow-x: auto;
}

.contentBox th,
.contentBox td {
	padding: 8px 12px;
	border: 1px solid var(--neutral-200);
	text-align: left;
}

.contentBox th {
	background-color: var(--neutral-100);
	font-weight: 600;
}

@media (max-width: 768px) {
	.contentBox {
		padding: 16px;
		font-size: 15px;
	}

	.contentBox h1 {
		font-size: 22px;
	}

	.contentBox h2 {
		font-size: 20px;
	}

	.contentBox h3 {
		font-size: 17px;
	}

	.info {
		flex-direction: column;
		gap: 8px;
	}

	.majorSectTitle {
		font-size: 22px;
	}
}
