/* ==========================================================================
   restart-fluent · content.css
   正文排版、阅读页、普通页面与 404。
   正文增强元素（黑幕 / GitHub 卡片 / 音乐卡 / 倒计时）先给一套基础样式，
   完整的交互与视觉在后续阶段迁入 extras.css。
   ========================================================================== */

/* ---------- 通用正文 ---------- */
.rich {
	font-size: 16px;
	line-height: 1.9;
	color: var(--text-dim);
	overflow-wrap: anywhere;
}

.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }

.rich p { margin: 0 0 1.15em; }

.rich h1,
.rich h2,
.rich h3,
.rich h4,
.rich h5,
.rich h6 {
	margin: 1.65em 0 .65em;
	font-weight: 600;
	line-height: 1.4;
	color: var(--text);
	scroll-margin-top: 20px;
}

.rich h1 { font-size: 26px; }
.rich h2 { font-size: 20px; }
.rich h3 { font-size: 17px; }
.rich h4 { font-size: 15px; }
.rich h5,
.rich h6 { font-size: 14px; color: var(--text-dim); }

.rich a {
	color: var(--accent-text);
	text-decoration: underline;
	text-decoration-color: var(--accent-line);
	text-underline-offset: 2px;
	transition: text-decoration-color .12s var(--ease);
}

.rich a:hover { text-decoration-color: currentColor; }

.rich strong,
.rich b { color: var(--text); font-weight: 600; }

.rich em { color: var(--text); }

.rich ul,
.rich ol {
	margin: 0 0 1.15em;
	padding-left: 1.45em;
}

.rich li { margin: .28em 0; }
.rich li::marker { color: var(--accent); }

.rich blockquote {
	margin: 0 0 1.2em;
	padding: 3px 12px 3px 16px;
	border-left: 3px solid var(--accent);
	background: var(--tile-tint);
	color: var(--text-dim);
}

.rich blockquote p:last-child { margin-bottom: 0; }

.rich hr {
	margin: 2em 0;
	border: 0;
	border-top: 1px solid var(--stroke);
}

.rich img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 1.4em auto;
	border: 1px solid var(--stroke);
}

.rich figure { margin: 1.4em 0; }
.rich figure img { margin: 0 auto; }

.rich figcaption {
	margin-top: 8px;
	font-size: 11.5px;
	color: var(--text-mute);
	text-align: center;
}

.rich table {
	width: 100%;
	margin: 1.2em 0;
	border-collapse: collapse;
	font-size: 13px;
}

.rich th,
.rich td {
	padding: 8px 10px;
	border: 1px solid var(--stroke);
	text-align: left;
}

.rich th {
	color: var(--text);
	background: var(--surface);
	font-weight: 600;
}

.rich tr:nth-child(even) td { background: rgba(255, 255, 255, .015); }
html[data-theme="light"] .rich tr:nth-child(even) td { background: rgba(12, 20, 32, .02); }

.rich code {
	padding: 1px 5px;
	font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	font-size: .88em;
	color: var(--accent-text);
	background: var(--code-bg);
	border: 1px solid var(--stroke);
}

.rich pre {
	margin: 0 0 1.2em;
	padding: 14px 16px;
	overflow-x: auto;
	font-size: 12.5px;
	line-height: 1.72;
	background: var(--code-bg);
	border: 1px solid var(--stroke);
	border-left: 3px solid var(--accent);
}

.rich pre code {
	padding: 0;
	font-size: .92em;
	color: var(--text);
	background: none;
	border: 0;
}

.rich .highlight {
	margin: 0 0 1.2em;
	background: transparent;
}

.rich .highlight pre {
	margin: 0;
}

/* Prism 行号：容器由站点配置决定是否输出 */
.rich pre[class*="language-"] {
	margin: 0 0 1.2em;
	border-radius: 0;
}

.rich pre.line-numbers { padding-left: 3.4em; }

/* ---------- 阅读页 ---------- */
.reader {
	max-width: 820px;
	margin: 0 auto;
}

.reader-head {
	margin-bottom: 26px;
	padding: 2px 0 20px;
	border-bottom: 1px solid var(--stroke);
}

.reader-kicker {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 8px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--accent-text);
}

.reader-kicker a { color: inherit; }
.reader-kicker a:hover { text-decoration: underline; }

.reader-title {
	margin: 0 0 14px;
	font-size: 32px;
	font-weight: 600;
	line-height: 1.32;
	letter-spacing: -.015em;
	overflow-wrap: anywhere;
}

.reader-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 11px;
	font-size: 12.5px;
	color: var(--text-mute);
}

.reader-meta .fa { margin-right: 5px; }

.reader-meta .dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: currentColor;
}

.article-body {
	font-size: 16.5px;
}

.reader-foot {
	margin-top: 36px;
	padding-top: 18px;
	border-top: 1px solid var(--stroke);
}

.reader-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 20px;
}

.reader-tags-label {
	margin-right: 4px;
	font-size: 11px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--text-mute);
}

.post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 26px;
}

.post-nav-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	min-height: 66px;
	padding: 12px 14px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
	transition: background .12s var(--ease), border-color .12s var(--ease);
}

.post-nav-item:hover {
	background: var(--tile-tint-hover);
	border-color: var(--stroke-strong);
}

.post-nav-item.is-next { text-align: right; }
.post-nav-item.is-empty { background: transparent; border-style: dashed; opacity: .35; }

.nav-dir {
	font-size: 11.5px;
	color: var(--text-mute);
}

.nav-title {
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--text);
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------- 普通页面 ---------- */
.page-card {
	max-width: 840px;
	margin: 0 auto;
	padding: 24px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
}

.page-head {
	margin-bottom: 26px;
	padding: 2px 0 18px;
	border-bottom: 1px solid var(--stroke);
}

.page-kicker {
	margin: 0 0 8px;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--accent-text);
}

.page-title {
	margin: 0;
	font-size: 30px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -.015em;
}

.page-desc {
	margin: 10px 0 0;
	font-size: 14px;
	color: var(--text-dim);
}

/* ---------- 404 ---------- */
.notfound {
	max-width: 680px;
	margin: 24px auto;
	padding: 42px 26px;
	text-align: center;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
}

.notfound-code {
	margin: 0;
	font-size: 86px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -.04em;
	color: var(--accent);
	opacity: .9;
}

.notfound-title {
	margin: 12px 0 10px;
	font-size: 22px;
	font-weight: 600;
}

.notfound-body {
	margin: 0 0 22px;
	color: var(--text-dim);
}

/* ---------- 正文标签的基础形态 ----------
   这些类由主题的标签插件生成；完整交互在后续阶段补齐。 */
.heimu {
	padding: 0 2px;
	color: transparent;
	background: var(--text);
	cursor: help;
	transition: color .16s var(--ease), background .16s var(--ease);
}

.heimu:hover,
.heimu:focus,
.heimu.is-open {
	color: var(--text);
	background: var(--surface-hover);
}

.ghcard {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 1.2em 0;
	padding: 14px 16px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
}

.ghcard-head {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	color: var(--text);
}

.ghcard-desc {
	font-size: 12px;
	color: var(--text-dim);
}

.ghcard-meta {
	font-size: 10.5px;
	color: var(--text-mute);
}

.music-card {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 1.2em 0;
	padding: 12px 14px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
}

.music-play {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	flex: none;
	padding: 0;
	border: 1px solid var(--accent-line);
	background: var(--accent-soft);
	color: var(--accent-text);
	cursor: pointer;
}

.music-meta {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.music-name { font-size: 12.5px; color: var(--text); }
.music-artist { font-size: 10.5px; color: var(--text-mute); }

.music-bar {
	display: block;
	height: 2px;
	margin-top: 4px;
	background: var(--stroke-strong);
	cursor: pointer;
}

.music-fill {
	display: block;
	width: 0;
	height: 100%;
	background: var(--accent);
}

.music-ico-playing { display: none; }

.countdown {
	margin: 1.2em 0;
	padding: 16px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
}

.cd-title {
	margin: 0 0 6px;
	font-size: 12px;
	color: var(--text-mute);
}

.cd-sentence {
	margin: 0;
	font-size: 16px;
	color: var(--text);
}

.cd-meta {
	margin: 6px 0 0;
	font-size: 10.5px;
	color: var(--text-mute);
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
	.reader-title { font-size: 23px; }
	.page-title { font-size: 24px; }
	.article-body { font-size: 15px; }
	.reader-meta { gap: 8px; }
	.post-nav { grid-template-columns: minmax(0, 1fr); }
	.post-nav-item.is-empty { display: none; }
	.notfound { padding: 30px 18px; }
	.notfound-code { font-size: 64px; }
}
