@font-face {
	font-family: "JetBrains Mono NF";
	src: url("/assets/fonts/jetbrains-mono-nf.woff2") format("woff2");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

/*
 * 字体：英文统一用 Paper Mono（SIL OFL 1.1，见 fonts/paper-mono-OFL.txt）。
 * Paper Mono 没有盲文点阵，ASCII art 仍用 JetBrains Mono NF；
 * 正文栈用只覆盖拉丁字母的 "Paper Latin"，中文与中文标点继续落到宋体。
 */
@font-face {
	font-family: "Paper Mono";
	src: url("/assets/fonts/paper-mono-regular.woff2") format("woff2");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Paper Mono";
	src: url("/assets/fonts/paper-mono-medium.woff2") format("woff2");
	font-style: normal;
	font-weight: 500;
	font-display: swap;
}

@font-face {
	font-family: "Paper Mono";
	src: url("/assets/fonts/paper-mono-semibold.woff2") format("woff2");
	font-style: normal;
	font-weight: 600;
	font-display: swap;
}

@font-face {
	font-family: "Paper Mono";
	src: url("/assets/fonts/paper-mono-bold.woff2") format("woff2");
	font-style: normal;
	font-weight: 700;
	font-display: swap;
}

@font-face {
	font-family: "Paper Latin";
	src: url("/assets/fonts/paper-mono-regular.woff2") format("woff2");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	unicode-range: U+0020-007E, U+00A0-00FF;
}

@font-face {
	font-family: "Paper Latin";
	src: url("/assets/fonts/paper-mono-semibold.woff2") format("woff2");
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	unicode-range: U+0020-007E, U+00A0-00FF;
}

:root {
	--font-mono: "Paper Mono", "JetBrains Mono NF", ui-monospace, monospace;
	--font-serif: "Paper Latin", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", STSong, SimSun, serif;
	--font-art: "JetBrains Mono NF", monospace;
}


/*
 * Light palette: the base foreground/background and primary accents come
 * from the user's local Otty One Light theme. Small semantic text uses the
 * paired high-contrast fish colors so it stays legible at website sizes.
 */
:root {
	color-scheme: light;
	--paper: #f8f8f8;
	--ink: #2a2b33;
	--muted: #6a737d;
	--faint: #959da5;
	--hairline: #d9d9dc;
	--soft: #eef0f3;
	--surface: #ffffff;
	--surface-raised: #ffffff;
	--surface-hover: #e8edf6;
	--surface-even: #fbfbfb;
	--border-soft: #dedee1;
	--border-strong: #bbbbbb;
	--line-number: #959da5;
	--body-muted: #4f515b;
	--muted-strong: #555862;
	--ascii: #555862;
	--ascii-strong: #2a2b33;
	--mark-fill: #f8f8f8;
	--mark-stroke: #6a737d;
	--mark-glow: transparent;
	--mark-animation: none;
	--selection-bg: #dbeafe;
	--selection-text: #24292e;
	--success-bg: #eaf5ea;
	--success-text: #176f2c;
	--accent-cyan: #2f5af3;
	--accent-iris: #a00095;
	--tree-open-label: var(--accent-cyan);
	--accent-gold: #8a5a00;
	--accent-love: #b31d28;
	--math-filter: none;
	--theme-bg: var(--paper);
	--theme-text: var(--ink);
	--theme-heading: var(--ink);
	--theme-code-bg: var(--surface);
	--theme-code-text: var(--ink);
	--theme-code-border: var(--border-soft);
	--theme-pre-bg: var(--surface);
	--theme-pre-border: var(--border-soft);
	--theme-line-numbers-border: var(--hairline);
	--theme-line-numbers-text: var(--line-number);
	--theme-copy-btn-bg: var(--surface-raised);
	--theme-copy-btn-text: var(--muted);
	--theme-copy-btn-border: var(--border-strong);
	--theme-copy-btn-hover-bg: var(--surface-hover);
	--theme-copy-btn-hover-text: var(--ink);
	--theme-copy-btn-copied-bg: var(--success-bg);
	--theme-copy-btn-copied-text: var(--success-text);
	--theme-copy-btn-copied-border: var(--success-text);
	--theme-table-border: var(--hairline);
	--theme-table-header-bg: var(--surface);
	--theme-table-row-even: var(--surface-even);
	--theme-table-row-hover: var(--surface-hover);
	--theme-math-filter: var(--math-filter);
	--theme-back-to-top: var(--muted);
	--theme-back-to-top-hover: var(--ink);
	--highlight-weak: #eef0f3;
	--highlight-strong: #dbeafe;
	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

/*
 * Dark palette: Rosé Pine supplies the page/surface hierarchy, while the
 * semantic cyan, purple and yellow come from the user's fish Dracula theme.
 * The page deliberately avoids pure black and pure white.
 */
html[data-theme="dark"] {
	color-scheme: dark;
	--paper: #191724;
	--ink: #e0def4;
	--muted: #908caa;
	--faint: #6e6a86;
	--hairline: #403d52;
	--soft: #26233a;
	--surface: #1f1d2e;
	--surface-raised: #26233a;
	--surface-hover: #2a273f;
	--surface-even: #211f31;
	--border-soft: #403d52;
	--border-strong: #524f67;
	--line-number: #6e6a86;
	--body-muted: #c8c5dc;
	--muted-strong: #b4b0c8;
	--ascii: #6e6a86;
	--ascii-strong: #908caa;
	--mark-fill: #ede3ff;
	--mark-stroke: #c4a7e7;
	--mark-glow: #bd93f9;
	--mark-animation: site-mark-glow 5.5s ease-in-out infinite;
	--selection-bg: #403d52;
	--selection-text: #e0def4;
	--success-bg: #21352e;
	--success-text: #50fa7b;
	--accent-cyan: #8be9fd;
	--accent-iris: #bd93f9;
	--tree-open-label: var(--accent-iris);
	--accent-gold: #f1fa8c;
	--accent-love: #ff5555;
	--math-filter: invert(1) hue-rotate(180deg);
	--theme-bg: var(--paper);
	--theme-text: var(--ink);
	--theme-heading: var(--ink);
	--theme-code-bg: var(--surface);
	--theme-code-text: var(--ink);
	--theme-code-border: var(--border-soft);
	--theme-pre-bg: var(--surface);
	--theme-pre-border: var(--border-soft);
	--theme-line-numbers-border: var(--hairline);
	--theme-line-numbers-text: var(--line-number);
	--theme-copy-btn-bg: var(--surface-raised);
	--theme-copy-btn-text: var(--muted);
	--theme-copy-btn-border: var(--border-strong);
	--theme-copy-btn-hover-bg: var(--surface-hover);
	--theme-copy-btn-hover-text: var(--ink);
	--theme-copy-btn-copied-bg: var(--success-bg);
	--theme-copy-btn-copied-text: var(--success-text);
	--theme-copy-btn-copied-border: var(--success-text);
	--theme-table-border: var(--hairline);
	--theme-table-header-bg: var(--surface);
	--theme-table-row-even: var(--surface-even);
	--theme-table-row-hover: var(--surface-hover);
	--theme-math-filter: var(--math-filter);
	--theme-back-to-top: var(--muted);
	--theme-back-to-top-hover: var(--ink);
	--highlight-weak: #26233a;
	--highlight-strong: #403d52;
}

@media (prefers-color-scheme: dark) {
	html:not([data-theme]) {
		color-scheme: dark;
		--paper: #191724;
		--ink: #e0def4;
		--muted: #908caa;
		--faint: #6e6a86;
		--hairline: #403d52;
		--soft: #26233a;
		--surface: #1f1d2e;
		--surface-raised: #26233a;
		--surface-hover: #2a273f;
		--surface-even: #211f31;
		--border-soft: #403d52;
		--border-strong: #524f67;
		--line-number: #6e6a86;
		--body-muted: #c8c5dc;
		--muted-strong: #b4b0c8;
		--ascii: #6e6a86;
		--ascii-strong: #908caa;
		--mark-fill: #ede3ff;
		--mark-stroke: #c4a7e7;
		--mark-glow: #bd93f9;
		--mark-animation: site-mark-glow 5.5s ease-in-out infinite;
		--selection-bg: #403d52;
		--selection-text: #e0def4;
		--success-bg: #21352e;
		--success-text: #50fa7b;
		--accent-cyan: #8be9fd;
		--accent-iris: #bd93f9;
		--tree-open-label: var(--accent-iris);
		--accent-gold: #f1fa8c;
		--accent-love: #ff5555;
		--math-filter: invert(1) hue-rotate(180deg);
		--theme-bg: var(--paper);
		--theme-text: var(--ink);
		--theme-heading: var(--ink);
		--theme-code-bg: var(--surface);
		--theme-code-text: var(--ink);
		--theme-code-border: var(--border-soft);
		--theme-pre-bg: var(--surface);
		--theme-pre-border: var(--border-soft);
		--theme-line-numbers-border: var(--hairline);
		--theme-line-numbers-text: var(--line-number);
		--theme-copy-btn-bg: var(--surface-raised);
		--theme-copy-btn-text: var(--muted);
		--theme-copy-btn-border: var(--border-strong);
		--theme-copy-btn-hover-bg: var(--surface-hover);
		--theme-copy-btn-hover-text: var(--ink);
		--theme-copy-btn-copied-bg: var(--success-bg);
		--theme-copy-btn-copied-text: var(--success-text);
		--theme-copy-btn-copied-border: var(--success-text);
		--theme-table-border: var(--hairline);
		--theme-table-header-bg: var(--surface);
		--theme-table-row-even: var(--surface-even);
		--theme-table-row-hover: var(--surface-hover);
		--theme-math-filter: var(--math-filter);
		--theme-back-to-top: var(--muted);
		--theme-back-to-top-hover: var(--ink);
		--highlight-weak: #26233a;
		--highlight-strong: #403d52;
	}
}

html,
body {
	min-height: 100%;
	background: var(--paper) !important;
	color: var(--ink) !important;
}

body {
	width: 100%;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--font-serif);
	font-size: 16px;
}

::selection {
	background: var(--selection-bg);
	color: var(--selection-text);
}

/* ---------- fixed shell ---------- */

header.site-header:first-of-type {
	position: fixed;
	top: 52px;
	left: 68px;
	z-index: 30;
	margin: 0;
	padding: 0;
}

.site-mark {
	color: var(--mark-fill);
	font-family: var(--font-mono);
	font-size: 11px;
	line-height: 1;
	letter-spacing: 0.03em;
	-webkit-text-stroke: 0.55px var(--mark-stroke);
	text-shadow:
		0 0 2px color-mix(in srgb, var(--mark-glow) 65%, transparent),
		0 0 7px color-mix(in srgb, var(--mark-glow) 45%, transparent),
		0 0 18px color-mix(in srgb, var(--mark-glow) 28%, transparent);
	animation: var(--mark-animation);
	user-select: none;
}

/* Slow halo-only breathing keeps the small letterforms sharp, without flicker. */
@keyframes site-mark-glow {
	50% {
		text-shadow:
			0 0 2px color-mix(in srgb, var(--mark-glow) 80%, transparent),
			0 0 9px color-mix(in srgb, var(--mark-glow) 60%, transparent),
			0 0 22px color-mix(in srgb, var(--mark-glow) 38%, transparent);
	}
}

@media print, (forced-colors: active) {
	.site-mark {
		color: CanvasText;
		-webkit-text-stroke: 0;
		text-shadow: none;
		animation: none;
	}
}

header.site-header:nth-of-type(2) {
	position: fixed;
	top: 100px;
	left: 68px;
	z-index: 30;
	margin: 0;
	padding: 0;
	font-family: var(--font-mono);
}

.site-nav {
	width: 150px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.site-nav::before {
	content: "~/";
	display: block;
	height: 24px;
	color: var(--muted);
	font-size: 11px;
	line-height: 24px;
}

.site-nav a:any-link {
	position: relative;
	height: 24px;
	padding: 0 0 0 35px;
	display: flex;
	align-items: center;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 11px;
	line-height: 24px;
	text-decoration: none;
	transition: color 120ms ease, background-color 120ms ease;
}

.site-nav a::before {
	content: "├──";
	position: absolute;
	left: 0;
	width: 29px;
	color: var(--faint);
	text-align: right;
}

.site-nav a:last-of-type::before {
	content: "└──";
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
	background: transparent;
	color: var(--ink);
	outline: none;
}

.site-nav a.is-active {
	color: var(--accent-cyan);
	font-weight: 600;
}

.site-nav a:hover::before,
.site-nav a:focus-visible::before,
.site-nav a.is-active::before {
	color: var(--muted);
}

html.has-bilingual .lang-toggle-btn {
	width: max-content;
	height: 22px;
	margin: 13px 0 0 9px;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 10px;
	line-height: 22px;
}

.theme-toggle-btn {
	width: max-content;
	height: 22px;
	margin: 13px 0 0 9px;
	padding: 0;
	display: flex !important;
	align-items: center;
	gap: 6px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 10px;
	line-height: 22px;
	cursor: pointer;
}

html.has-bilingual .theme-toggle-btn {
	margin-top: 4px;
}

.lang-toggle-btn::before,
.theme-toggle-btn::before {
	color: var(--faint);
}

.lang-toggle-btn::before {
	content: "lang:";
}

.theme-toggle-btn::before {
	content: "theme:";
}

.lang-toggle-btn .toggle-icon {
	display: none;
}

.theme-toggle-btn .toggle-icon {
	width: 18px;
	height: 18px;
	color: currentColor !important;
}

.theme-toggle-btn.is-dark {
	color: var(--accent-gold);
}

html[data-theme="dark"] .theme-toggle-btn .ui-icon-tint {
	fill: var(--accent-iris);
	opacity: 0.28;
}

.lang-toggle-btn:hover,
.lang-toggle-btn:focus-visible,
.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
	background: transparent;
	outline: 0;
}

.lang-toggle-btn:hover,
.lang-toggle-btn:focus-visible {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
	color: var(--accent-cyan);
}

.lang-toggle-btn:focus-visible,
.theme-toggle-btn:focus-visible {
	outline: 1px solid var(--accent-cyan);
	outline-offset: 3px;
}

footer {
	position: fixed;
	left: 68px;
	bottom: 52px;
	z-index: 20;
	margin: 0;
	padding: 0;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 10px;
	line-height: 1.5;
}

footer a:any-link {
	color: inherit;
	text-decoration: none;
}

footer a:hover {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.page-jump-btn {
	display: none !important;
}

/* ---------- generic reading layout ---------- */

/* 全站两条竖线：左栏 --rail（logo、导航、页脚）与内容栏 --content-left；首页也对齐这两条线。 */
body {
	--rail: 68px;
	--content-left: 400px;
	--content-right: calc(var(--content-left) + min(820px, 100vw - var(--content-left) - 48px));
}

body > article {
	width: min(720px, calc(100vw - var(--content-left, 400px) - 48px));
	max-width: none;
	margin: 0 0 0 var(--content-left, 400px);
	padding: 100px 0 130px;
}

article:has(.cv-page),
article:has(.blog-index),
article:has(.travel-page),
article:has(.status-page) {
	width: min(820px, calc(100vw - var(--content-left, 400px) - 48px));
}

body:has(.hub-page) {
	overflow-x: hidden;
}

body:has(.hub-page) footer {
	display: none;
}

/* 首页保留极小的全局主题入口，但不显示或折叠一级导航；与 logo 同一行，右边距与 logo 的左边距对称。 */
body:has(.hub-page) header.site-header:nth-of-type(2) {
	display: block;
	position: fixed;
	top: 54px;
	left: auto;
	right: var(--rail);
}

body:has(.hub-page) .site-nav {
	width: max-content;
}

body:has(.hub-page) .site-nav::before,
body:has(.hub-page) .site-nav a,
body:has(.hub-page) .lang-toggle-btn {
	display: none !important;
}

body:has(.hub-page) .theme-toggle-btn {
	margin: 0;
}

/* 首页 article 铺满视口：外框（logo、主题开关、标语）贴四周，人物与链接树作为一组居中。 */
body:has(.hub-page) article {
	width: 100%;
	height: 100svh;
	min-height: 520px;
	margin: 0;
	padding: 0;
}

body:has(.hub-page) article > section {
	height: 100%;
}

article section {
	padding: 0 !important;
}

article section > p,
article section > div,
article section > ul,
article section > ol,
article section > blockquote,
article section > pre,
article section > figure,
article section > h2,
article section > h3,
article section > h4 {
	width: 100%;
	max-width: none;
}

article p,
article li,
.bilingual-panel {
	font-family: var(--font-serif);
	font-size: 1.06rem;
	line-height: 1.9;
	text-align: justify;
	text-justify: inter-ideograph;
}

article p {
	margin: 1.2rem 0;
}

article h2,
article h3,
article h4 {
	font-family: var(--font-serif);
	font-style: normal;
	font-weight: 400;
	letter-spacing: 0.01em;
}

article section > h2:first-of-type {
	margin: 0 0 1.25rem;
	font-size: clamp(1.7rem, 2.3vw, 2.15rem);
	line-height: 1.35;
}

article h3 {
	margin: 3.4rem 0 1.1rem;
	font-size: 1.38rem;
	line-height: 1.4;
}

article h4 {
	margin: 2.6rem 0 0.9rem;
	font-size: 1.16rem;
}

article a:any-link {
	color: inherit;
	background: none;
	text-shadow: none;
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

article a:hover,
article a:focus-visible {
	background: var(--soft);
	outline: none;
}

.article-byline {
	margin: -0.4rem 0 2.8rem;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 10px;
	line-height: 1.6;
}

.bilingual {
	width: 100%;
	margin: 1.2rem 0;
}

.bilingual-panel {
	font-size: 1.06rem;
	line-height: 1.9;
}

pre:not(.ascii-art) {
	margin: 1.8rem 0;
	padding: 1.25rem 1.35rem;
	border: 1px solid var(--hairline);
	border-radius: 0;
	background: var(--theme-pre-bg) !important;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	line-height: 1.75;
}

code,
kbd,
samp {
	font-family: var(--font-mono);
	font-size: 0.82em;
}

blockquote {
	margin: 2rem 0;
	padding-left: 1.2rem;
	border-left: 1px solid var(--ink);
	font-style: normal;
}

hr {
	border: 0;
	border-top: 1px solid var(--hairline);
}

img,
img[src$="-ink.webp"] {
	filter: none !important;
}

figure,
article section > img,
article section > p > img {
	max-width: 100%;
}

.marginnote,
.sidenote {
	width: 210px;
	margin-right: -260px;
	color: var(--muted);
	font-family: var(--font-serif);
	font-size: 0.76rem;
	line-height: 1.7;
}

/* 目录放进左栏导航下方（与 CV 人物同一位置），不再浮在内容栏右侧——缩放后内容栏会延伸到视口右缘，右侧浮层必然压住正文。 */
.toc-sidebar {
	display: block;
	left: var(--rail);
	right: auto;
	top: 364px;
	width: calc(var(--content-left) - var(--rail) - 48px);
	max-height: calc(100vh - 364px - 110px);
	color: var(--faint);
	font-family: var(--font-mono);
}

/* 视口太矮时左栏放不下目录，宁可不显示也不和页脚挤在一起。 */
@media (max-height: 560px) {
	.toc-sidebar {
		display: none !important;
	}
}

.toc-sidebar::before {
	content: "on this page";
	display: block;
	margin-bottom: 0.8rem;
	color: var(--muted);
	font-size: 10px;
}

.toc-sidebar a:any-link {
	padding-left: 0.7rem;
	border-left: 1px solid var(--hairline);
	font-size: 9px;
	line-height: 1.35;
}

.toc-sidebar a:hover,
.toc-sidebar a:focus-visible,
.toc-sidebar a.is-active {
	color: var(--ink);
	border-left-color: var(--ink);
}

/* ---------- shared terminal components ---------- */

.mono,
.page-path,
.section-path,
.file-tree,
.file-row,
.page-meta,
.cv-kicker,
.cv-focus,
.cv-stats,
.cv-contact,
.blog-meta,
.key-hints,
.travel-locations {
	font-family: var(--font-mono);
}

/* 每页第一行都是路径（~/blog、~/cv、文章面包屑），与 .blog-index h1 同一样式，落在 100px 那一行。 */
.page-path {
	margin-bottom: 28px;
	color: var(--ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 24px;
}

.ascii-art,
pre.ascii-art {
	width: -webkit-max-content;
	width: max-content;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent !important;
	color: var(--ascii);
	font-family: var(--font-art);
	font-weight: 400;
	text-align: left;
	line-height: 0.9;
	letter-spacing: 0;
	white-space: pre;
	overflow: visible;
	cursor: crosshair;
	user-select: none;
	transition: color 160ms ease;
}

.ascii-art.is-interacting {
	color: var(--ascii-strong);
}

.section-path {
	margin: 0 0 12px;
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
}

/* ---------- collapsible second-level trees ---------- */

.tree-section {
	margin: 0;
	padding: 0;
	border: 0;
}

.tree-summary {
	min-height: 24px;
	display: flex;
	align-items: center;
	gap: 8px;
	list-style: none;
	color: var(--muted);
	cursor: pointer;
	user-select: none;
	transition: color 120ms ease, background-color 120ms ease;
}

.tree-summary::-webkit-details-marker {
	display: none;
}

.tree-summary::before {
	content: "";
	width: 0;
	height: 0;
	margin-inline: 3px;
	flex: 0 0 auto;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	border-left: 6px solid var(--faint);
	transform-origin: center;
	transition: transform 150ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tree-section[open] > .tree-summary::before {
	transform: rotate(90deg);
}

.tree-section[open] > .tree-summary .tree-label {
	color: var(--tree-open-label);
}

.tree-summary:hover {
	color: var(--ink);
	background: var(--soft);
}

.tree-summary:focus-visible {
	color: var(--accent-cyan);
	outline: 1px solid var(--accent-cyan);
	outline-offset: 3px;
}

.tree-section:not([open]) > .tree-summary {
	margin-bottom: 0;
}

.tree-panel {
	min-width: 0;
}

html.theme-anim-ready .site-mark,
html.theme-anim-ready .site-nav a,
html.theme-anim-ready .lang-toggle-btn,
html.theme-anim-ready .theme-toggle-btn,
html.theme-anim-ready .tree-summary,
html.theme-anim-ready .ascii-art,
html.theme-anim-ready footer {
	transition:
		background-color 240ms ease,
		color 240ms ease,
		border-color 240ms ease;
}

/* ---------- standalone hub home ---------- */

/*
 * 首页是落地页，不套内页的 68/400 两栏：上下各留出 logo 行与标语行，
 * 人物和链接树在中间的区域里水平、垂直居中，二者中线对齐。
 */
.hub-page {
	position: relative;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	padding: 96px var(--rail) 112px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(48px, 6vw, 112px);
	/* 武藏点阵的列数，窄屏时用它反推字号。 */
	--hub-art-cols: 112;
}

/* 112 列：1512px 宽约 590px，缩放到 1080px 宽约 420px。 */
.hub-ascii {
	flex: none;
	font-size: clamp(5.5px, 0.58vw, 9px);
}

.hub-tree {
	flex: none;
	width: 200px;
	font-family: var(--font-mono);
	font-size: 11px;
	line-height: 24px;
}

/* 行高、缩进与左栏 .site-nav 完全一致：24px 一行，分支符 29px 宽、文字从 35px 起。 */
.hub-root {
	display: block;
	height: 24px;
	color: var(--muted-strong);
}

.hub-link {
	width: 100%;
	height: 24px;
	padding: 0 6px 0 0;
	display: grid;
	grid-template-columns: 29px 1fr;
	align-items: center;
	column-gap: 6px;
	color: var(--muted) !important;
	font-family: var(--font-mono);
	font-size: 11px;
	line-height: 24px;
	text-decoration: none !important;
	transition: color 120ms ease, background-color 120ms ease;
}

.hub-link .branch {
	color: var(--faint);
	text-align: right;
}

.hub-link:hover,
.hub-link:focus-visible,
.hub-link.is-keyed {
	background: var(--soft) !important;
	color: var(--ink) !important;
	outline: none;
}

.hub-link:hover .branch,
.hub-link:focus-visible .branch {
	color: var(--muted);
}

/* 与内页页脚同一位置：左栏线、距底 52px。 */
.hub-note {
	position: absolute;
	left: var(--rail);
	bottom: 52px;
	margin: 0;
	color: var(--muted-strong);
	font-family: var(--font-mono);
	font-size: 11px;
	line-height: 1.5;
	letter-spacing: 0.02em;
}

/* ---------- 首页开场动画（assets/intro.js） ---------- */

/* 播放期间先藏起页面本身，舞台盖在最上层；脚本最晚 4s 内一定会移除这个类。 */
html.intro-playing body > :not(.intro-overlay) {
	visibility: hidden !important;
}

.intro-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	background: var(--paper);
	cursor: pointer;
	transition: opacity 380ms ease;
}

.intro-overlay.is-leaving {
	opacity: 0;
	pointer-events: none;
}

/* 舞台 110 列：字号随视口收缩，桌面上 13px。用 div 而不是 pre，避开站内代码块样式。 */
.intro-stage {
	margin: 0 0 6vh;
	color: var(--ascii-strong);
	font-family: var(--font-art);
	font-size: min(13px, (100vw - 48px) / 66);
	line-height: 0.9;
	letter-spacing: 0;
	white-space: pre;
	user-select: none;
}

/* ---------- CV page ---------- */

.cv-page {
	position: relative;
	min-height: 760px;
}

.cv-ascii {
	position: fixed;
	/* 六项导航后还有语言与主题两行开关，人物与整组控件保持 35px。 */
	top: 364px;
	left: var(--rail, 68px);
	z-index: 1;
	font-size: 8px;
}

.cv-sheet {
	position: relative;
	z-index: 2;
	width: 100%;
	margin-left: 0;
}

.cv-sheet h1 {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 23px;
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.04em;
}

.cv-section {
	margin-top: 42px;
}

.cv-section > .tree-summary,
.blog-year > .tree-summary,
.cloud-tree-branch > .tree-summary {
	font-family: var(--font-mono);
}

.cv-row {
	min-height: 32px;
	display: grid;
	grid-template-columns: 38px 152px minmax(0, 1fr) max-content;
	align-items: baseline;
	column-gap: 10px;
	padding-block: 4px;
	font-size: 12px;
	line-height: 1.6;
}

.cv-row > * {
	min-width: 0;
}

.cv-branch {
	color: var(--faint);
	font-family: var(--font-mono);
}

.cv-row.cv-row-link {
	width: calc(100% + 0.85rem);
	margin: 0 -0.4rem 0 -0.45rem;
	padding: 4px 0.4rem 4px 0.45rem;
	color: inherit;
	text-decoration: none !important;
	transition: background-color 120ms ease;
}

.cv-row.cv-row-link:hover,
.cv-row.cv-row-link:focus-visible,
.cv-row.cv-row-link.is-keyed,
.cv-row.cv-row-link.is-active {
	background: var(--soft);
	outline: none;
}

.cv-name,
.cv-name a {
	color: var(--ink);
	font-family: var(--font-mono);
	font-weight: 600;
	text-decoration: none;
}

.cv-description {
	padding-right: 20px;
	color: var(--body-muted);
	font-family: var(--font-serif);
	font-size: 13px;
	line-height: 1.5;
}

.cv-tag {
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 10px;
	text-align: right;
	white-space: nowrap;
}

.cv-stats {
	margin: 0 0 15px;
	color: var(--muted);
	font-size: 10px;
}

.cv-page #github-graph {
	width: 530px;
	max-width: 100%;
	margin: 0;
	overflow: hidden;
	clip-path: inset(0 100% 0 0);
	opacity: 0.52;
	transition:
		clip-path 920ms cubic-bezier(0.33, 1, 0.68, 1),
		opacity 560ms ease;
}

.cv-page #github-graph.is-revealed {
	clip-path: inset(0 0 0 0);
	opacity: 1;
}

.cv-page #github-graph .gh-chart {
	width: 100%;
	max-width: 100%;
	/* custom.css 遗留的移动端 min-width: 660px 会把图撑出容器，
		而这里 overflow: hidden 没法滚动，手机上只能看到前一半；
		用同属性更高优先级压掉，让整图缩进容器宽度 */
	min-width: 0;
	height: auto;
}

/* Light: goes to grey; Dark: Rosé Pine SVG already carries iris tint, keep native */
html[data-theme="dark"] .cv-page #github-graph .gh-chart {
	filter: none;
}

html:not([data-theme="dark"]) .cv-page #github-graph .gh-chart,
html[data-theme="light"] .cv-page #github-graph .gh-chart {
	filter: grayscale(1);
}

@media (prefers-reduced-motion: reduce) {
	.cv-page #github-graph {
		clip-path: none;
		transition: none;
		opacity: 1;
	}
}

.cv-contact {
	margin-top: 24px;
	color: var(--muted);
	font-size: 10px;
}

.cv-contact a:any-link {
	color: inherit;
	text-decoration: none;
}

/* ---------- blog index ---------- */

.blog-index {
	position: relative;
	min-height: 760px;
}

.blog-index h1,
.travel-page h1 {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 600;
	line-height: 24px;
}

.index-intro {
	margin: 27px 0 0;
	color: var(--body-muted);
	font-family: var(--font-serif);
	font-size: 15px;
}

.blog-meta {
	margin: 14px 0 0;
	color: var(--muted);
	font-size: 10px;
}

.blog-tree {
	width: 100%;
	margin-top: 52px;
}

.blog-year + .blog-year {
	margin-top: 18px;
}

.blog-file-row {
	min-height: 36px;
	display: grid;
	grid-template-columns: 38px 80px minmax(0, 1fr) max-content;
	align-items: baseline;
	column-gap: 10px;
	padding-block: 4px;
	color: inherit;
	font-size: 12px;
	line-height: 1.6;
	text-decoration: none !important;
}

.blog-file-row:hover,
.blog-file-row:focus-visible,
.blog-file-row.is-keyed {
	background: var(--soft);
	outline: none;
}

.blog-file-row .branch {
	color: var(--faint);
	font-family: var(--font-mono);
}

.blog-file-row .date {
	font-family: var(--font-mono);
	font-weight: 600;
}

.blog-file-row .title {
	padding-right: 18px;
	font-family: var(--font-serif);
	font-size: 13px;
}

.blog-file-row .tag {
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 10px;
}

.blog-divider {
	width: 100%;
	margin: 7px 0 0;
	border-top: 1px solid var(--hairline);
}

.key-hints {
	margin-top: 28px;
	color: var(--muted);
	font-size: 9px;
}

.blog-ascii {
	position: absolute;
	top: 405px;
	right: 18px;
	font-size: 8px;
	color: var(--muted-strong);
}

/* ---------- travel ---------- */

.travel-page {
	min-height: 760px;
}

.travel-layout {
	margin-top: 54px;
	display: grid;
	grid-template-columns: minmax(430px, 500px) minmax(300px, 1fr);
	gap: 48px;
	align-items: start;
}

#travel-globe {
	width: 100%;
	margin: 0;
}

.globe-svg {
	width: 100%;
	max-width: 480px;
	margin: 0;
	color: var(--ink);
}

.globe-ocean {
	fill: transparent;
}

.globe-graticule {
	stroke-width: 0.5;
	opacity: 0.16;
}

.globe-land {
	stroke-width: 0.8;
	opacity: 0.72;
}

.globe-rim {
	stroke-width: 0.8;
	opacity: 0.42;
}

.globe-marker-dot {
	fill: var(--ink);
}

.globe-marker-halo {
	fill: var(--ink);
	opacity: 0.1;
}

.globe-marker-ring {
	stroke: var(--ink);
	opacity: 0.45;
}

.globe-marker-label {
	font-family: var(--font-serif);
	font-size: 12px;
	stroke: var(--paper);
	stroke-width: 3px;
}

.globe-legend {
	display: none;
}

.travel-tree {
	padding-top: 24px;
	font-family: var(--font-mono);
	font-size: 11px;
}

.travel-group,
.travel-link {
	min-height: 32px;
	display: grid;
	grid-template-columns: 38px 130px minmax(0, 1fr);
	align-items: baseline;
	column-gap: 10px;
	padding-block: 4px;
	line-height: 1.6;
}

summary.travel-group.tree-summary::before {
	grid-column: 1;
	justify-self: center;
}

summary.travel-group.tree-summary .tree-label {
	grid-column: 2 / -1;
}

.travel-group {
	color: var(--ink);
	font-weight: 600;
}

.travel-link {
	margin: 0;
	padding-left: 24px;
	color: inherit;
	text-indent: 0;
	text-decoration: none !important;
}

.trip-link.travel-link::before,
.trip-link.travel-link:hover::before,
.trip-link.travel-link:focus-visible::before,
.trip-link.travel-link.is-active::before {
	content: none !important;
	display: none !important;
}

.travel-link:hover,
.travel-link:focus-visible,
.travel-link.is-active {
	background: var(--soft);
	outline: none;
}

.travel-group .branch,
.travel-link .branch {
	color: var(--faint);
}

.travel-link .label {
	font-family: var(--font-serif);
	font-size: 12px;
}

.travel-hints {
	margin-top: 24px;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 9px;
}

.travel-locations {
	margin-top: 50px;
	color: var(--muted);
	font-size: 9px;
	line-height: 2.4;
}

/* ---------- docs index ---------- */

.docs-index {
	min-height: 650px;
}

.docs-tree {
	width: 100%;
	margin-top: 42px;
	font-family: var(--font-mono);
}

.docs-tree-section + .docs-tree-section {
	margin-top: 18px;
}

.docs-link {
	min-height: 32px;
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr);
	align-items: baseline;
	column-gap: 10px;
	padding: 4px 0 4px 12px;
	color: var(--body-muted) !important;
	font-size: 11px;
	line-height: 1.6;
	text-decoration: none !important;
}

.docs-link .branch {
	color: var(--faint);
}

.docs-link:hover,
.docs-link:focus-visible,
.docs-link.is-keyed {
	background: var(--soft);
	color: var(--ink) !important;
	outline: none;
}

/* ---------- live server status ---------- */

.status-page {
	width: 100%;
	min-height: 760px;
	font-family: var(--font-mono);
}

.status-header {
	padding: 0 0 28px;
	border-bottom: 1px solid var(--hairline);
}

.status-header .page-path {
	margin-bottom: 17px;
}

.status-title-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.status-title-line h1 {
	margin: 0;
	color: var(--ink);
	font-family: var(--font-mono);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.025em;
}

.status-connection {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--muted);
	font-size: 10px;
	line-height: 1;
	text-transform: lowercase;
}

.status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--faint);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--faint) 14%, transparent);
}

.status-page[data-connection="live"] .status-connection {
	color: var(--success-text);
}

.status-page[data-connection="live"] .status-dot {
	background: var(--success-text);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--success-text) 16%, transparent);
	animation: status-pulse 2s ease-in-out infinite;
}

.status-page[data-connection="stale"] .status-connection,
.status-page[data-connection="connecting"] .status-connection {
	color: var(--accent-gold);
}

.status-page[data-connection="stale"] .status-dot,
.status-page[data-connection="connecting"] .status-dot {
	background: var(--accent-gold);
}

.status-page[data-connection="offline"] .status-connection {
	color: var(--accent-love);
}

.status-page[data-connection="offline"] .status-dot {
	background: var(--accent-love);
}

@keyframes status-pulse {
	50% {
		opacity: 0.45;
		transform: scale(0.82);
	}
}

article .status-intro {
	max-width: 620px;
	margin: 20px 0 0;
	color: var(--body-muted);
	font-family: var(--font-serif);
	font-size: 14px;
	line-height: 1.75;
}

article .status-command,
article .status-packet {
	margin: 15px 0 0;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 9px;
	line-height: 1.6;
}

article .status-packet {
	margin-top: 5px;
	color: var(--faint);
}

.status-fleet {
	margin-top: 36px;
}

.status-fleet-title {
	margin: 0 0 18px;
	color: var(--tree-open-label);
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
}

.status-node-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 52px;
	row-gap: 46px;
}

.status-node {
	min-width: 0;
	padding: 0;
}

.status-node-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 22px;
	list-style: none;
	cursor: pointer;
	user-select: none;
	transition: color 140ms ease, background-color 140ms ease;
}

.status-node-header::-webkit-details-marker {
	display: none;
}

.status-node-header::before {
	content: "";
	width: 0;
	height: 0;
	margin-inline: 3px;
	flex: 0 0 auto;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	border-left: 6px solid var(--faint);
	transform-origin: center;
	transition: transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.status-node[open] > .status-node-header::before {
	transform: rotate(90deg);
}

.status-node[data-disclosure="closing"] > .status-node-header::before {
	transform: rotate(0deg);
}

.status-node-header:hover {
	background: var(--soft);
}

.status-node-header:focus-visible {
	outline: 1px solid var(--accent-cyan);
	outline-offset: 4px;
}

.status-node-content {
	min-width: 0;
	overflow: hidden;
}

.status-node-content-inner {
	min-height: 0;
}

.status-node-name {
	min-width: 0;
	flex: 1;
	margin: 0;
	color: var(--ink);
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
}

.status-node-branch {
	display: inline-block;
	width: 42px;
	color: var(--faint);
	font-weight: 400;
}

.status-node-state {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--muted);
	font-size: 9px;
	line-height: 1;
	text-transform: lowercase;
}

.status-node-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--faint);
}

.status-node[data-node-state="up"] .status-node-state {
	color: var(--success-text);
}

.status-node[data-node-state="up"] .status-node-dot {
	background: var(--success-text);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--success-text) 13%, transparent);
}

.status-node[data-node-state="paused"] .status-node-state,
.status-node[data-node-state="pending"] .status-node-state,
.status-node[data-node-state="stale"] .status-node-state {
	color: var(--accent-gold);
}

.status-node[data-node-state="paused"] .status-node-dot,
.status-node[data-node-state="pending"] .status-node-dot,
.status-node[data-node-state="stale"] .status-node-dot {
	background: var(--accent-gold);
}

.status-node[data-node-state="down"] .status-node-state,
.status-node[data-node-state="unknown"] .status-node-state {
	color: var(--accent-love);
}

.status-node[data-node-state="down"] .status-node-dot,
.status-node[data-node-state="unknown"] .status-node-dot {
	background: var(--accent-love);
}

article .status-node-packet {
	margin: 7px 0 0 42px;
	width: calc(100% - 42px);
	color: var(--faint);
	font-family: var(--font-mono);
	font-size: 8px;
	line-height: 1.5;
}

.status-node-meters {
	margin: 20px 0 23px;
	width: 100%;
	padding-top: 10px;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2px;
	border-top: 1px solid var(--hairline);
}

.status-meter {
	min-width: 0;
	min-height: 25px;
	padding: 4px 0;
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) 44px;
	align-items: center;
	column-gap: 8px;
	color: var(--muted);
}

.status-meter-head {
	display: contents;
	font-size: 8px;
	line-height: 1.4;
}

.status-meter-head > span {
	grid-column: 1;
	grid-row: 1;
}

.status-meter-value {
	grid-column: 3;
	grid-row: 1;
	color: var(--ink);
	font: inherit;
	text-align: right;
}

.status-bar {
	--meter-value: 0%;
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
	margin: 0;
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr) max-content;
	align-items: center;
	column-gap: 2px;
	color: var(--accent-cyan);
	font-size: 8px;
	line-height: 1;
}

.status-bar::before {
	content: "[";
}

.status-bar::after {
	content: "]";
}

.status-bar-text {
	position: relative;
	min-width: 0;
	height: 6px;
	display: block;
	background: repeating-linear-gradient(
		to right,
		color-mix(in srgb, var(--faint) 62%, transparent) 0 3px,
		transparent 3px 5px
	);
	overflow: hidden;
}

.status-bar-text::after {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--meter-value);
	background: repeating-linear-gradient(
		to right,
		currentColor 0 3px,
		transparent 3px 5px
	);
}

.status-meter.is-warning .status-bar,
.status-meter.is-warning .status-meter-value {
	color: var(--accent-gold);
}

.status-meter.is-critical .status-bar,
.status-meter.is-critical .status-meter-value {
	color: var(--accent-love);
}

.status-meter.is-unavailable {
	color: var(--faint);
}

.status-tree {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	font-size: 9px;
	line-height: 1.55;
}

.status-row {
	min-height: 25px;
	display: grid;
	grid-template-columns: minmax(102px, 0.72fr) minmax(0, 1.28fr);
	align-items: baseline;
	column-gap: 16px;
	padding-block: 4px;
}

.status-row dt {
	min-width: 0;
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr);
	color: var(--muted);
}

.status-row dd {
	min-width: 0;
	margin: 0;
	color: var(--ink);
	overflow-wrap: anywhere;
}

.status-branch {
	color: var(--faint);
}

html.theme-anim-ready .status-header,
html.theme-anim-ready .status-meter,
html.theme-anim-ready .status-node,
html.theme-anim-ready .status-node-state,
html.theme-anim-ready .status-node-dot,
html.theme-anim-ready .status-dot,
html.theme-anim-ready .status-connection,
html.theme-anim-ready .status-bar,
html.theme-anim-ready .status-bar-text::after,
html.theme-anim-ready .status-row dd {
	transition:
		background-color 240ms ease,
		color 240ms ease,
		border-color 240ms ease,
		box-shadow 240ms ease,
		width 360ms ease;
}

/* ---------- article details ---------- */

body:not(:has(.hub-page, .cv-page, .blog-index, .travel-page)) article section > h2:first-of-type {
	padding-bottom: 24px;
	border-bottom: 1px solid var(--hairline);
}

/* ---------- responsive ---------- */

/*
 * 桌面宽度（≥1001px，含浏览器放大到 125%–150% 的情况）全站只用 68px / 400px 两条线，不再在
 * 1001–1200 把内容栏挪到 300px——那会让首页和内页在缩放后各对各的线。内容栏变窄时，
 * 只让旅行页的地球与笔记改为上下排列。
 */
@media (min-width: 1001px) and (max-width: 1240px) {
	.travel-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	#travel-globe {
		max-width: 480px;
	}

	.travel-tree {
		width: min(480px, 100%);
	}
}

@media (max-width: 1000px) {
	body:not(:has(.hub-page)) {
		--content-left: 24px;
	}

	header.site-header:first-of-type,
	header.site-header:nth-of-type(2),
	footer {
		position: static;
		margin-left: 24px;
	}

	header.site-header:first-of-type {
		padding-top: 24px;
	}

	header.site-header:nth-of-type(2) {
		margin-top: 30px;
	}

	footer {
		margin-top: 70px;
		padding-bottom: 30px;
	}

	body > article,
	body > article:has(.cv-page),
	body > article:has(.blog-index),
	body > article:has(.travel-page),
	body > article:has(.status-page) {
		width: auto;
		max-width: 760px;
		margin: 0 24px;
		padding: 64px 0 40px;
	}

	.toc-sidebar {
		display: none !important;
	}

	.marginnote,
	.sidenote {
		width: auto;
		margin: 1rem 0;
		float: none;
	}

	body:has(.hub-page) header.site-header:first-of-type {
		position: static;
		margin-left: 24px;
		padding-top: 24px;
	}

	/* 窄屏只剩 24px 一条左边线：主题开关回到 logo 同一行的右端。 */
	body:has(.hub-page) header.site-header:nth-of-type(2) {
		top: 18px;
		left: auto;
		right: 24px;
		margin: 0;
		transform: none;
	}

	body:has(.hub-page) article {
		width: auto;
		height: auto;
		min-height: calc(100svh - 90px);
		margin: 0;
		padding: 0 24px 24px;
	}

	.hub-page {
		min-height: calc(100svh - 114px);
		padding: 0;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		gap: 0;
	}

	.hub-ascii,
	.hub-tree,
	.hub-note {
		position: static;
	}

	/* 需压过 pre.ascii-art 的 margin: 0。人物、链接树、标语都贴 24px 左边线，人物宽度撑满版心。 */
	pre.hub-ascii {
		width: max-content;
		margin: 48px 0 0;
		font-size: min(8px, (100vw - 48px) / (var(--hub-art-cols) * 0.6));
	}

	.hub-tree {
		margin: 48px 0 0;
	}

	.hub-note {
		margin: auto 0 0;
		padding-top: 4rem;
	}

	.cv-page {
		display: flex;
		flex-direction: column;
	}

	.cv-ascii {
		position: static;
		order: 2;
		align-self: center;
		margin-top: 58px;
		font-size: 8px;
	}

	.cv-sheet {
		order: 1;
		width: 100%;
		margin: 0;
	}

	.blog-ascii {
		position: static;
		width: max-content;
		margin: 80px auto 0;
	}

	.travel-layout {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	#travel-globe {
		max-width: 520px;
		margin: 0 auto;
	}

	.travel-tree {
		width: min(420px, 100%);
		margin: 0 auto;
	}
}

@media (max-width: 620px) {
	body > article {
		margin-inline: 18px;
	}

	.cv-row {
		grid-template-columns: 30px minmax(0, 1fr) max-content;
		row-gap: 4px;
		margin-bottom: 16px;
	}

	.cv-description {
		grid-column: 2 / -1;
		grid-row: 2;
		padding-right: 0;
	}

	.cv-tag {
		grid-column: 3;
	}

	.blog-file-row {
		grid-template-columns: 30px 62px minmax(0, 1fr);
		row-gap: 5px;
		margin-bottom: 15px;
	}

	.blog-file-row .tag {
		grid-column: 3;
	}

	.travel-group,
	.travel-link {
		grid-template-columns: 30px minmax(0, 1fr);
		row-gap: 3px;
	}

	.travel-link {
		padding-left: 12px;
	}

	.travel-link .label {
		grid-column: 2;
		color: var(--muted);
	}

	article section > h2:first-of-type {
		font-size: 1.65rem;
	}

	pre:not(.ascii-art) {
		overflow-x: auto;
	}

	.status-title-line {
		align-items: flex-start;
		flex-direction: column;
		gap: 12px;
	}

	.status-node-list {
		grid-template-columns: 1fr;
	}

	.status-node-list {
		row-gap: 36px;
	}

	.status-row {
		grid-template-columns: minmax(112px, 0.75fr) minmax(0, 1fr);
		column-gap: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-mark {
		animation: none;
	}

	.ascii-art,
	.site-nav a,
	.lang-toggle-btn,
	.theme-toggle-btn,
	.tree-summary,
	.tree-summary::before,
	.status-node-header,
	.status-node-header::before,
	.blog-file-row,
	.travel-link {
		transition: none !important;
	}

	.ascii-art {
		cursor: default;
	}

	.status-page[data-connection="live"] .status-dot {
		animation: none;
	}
}

/* CLI is a viewing mode, separated from the home page's content tree. */
/* 11px 外边距 + 1px 线 + 12px 内边距 + 24px 行 = 两个 24px 行，保持链接树的节奏。 */
.hub-cli-switch:any-link {
  display: flex; align-items: center; gap: 6px;
  margin-top: 11px; padding: 12px 6px 0 0;
  border-top: 1px solid var(--hairline);
  color: var(--muted-strong); font: inherit; font-size: 11px; line-height: 24px;
  text-decoration: none; background: none;
}
.hub-cli-symbol { width: 29px; text-align: right; color: var(--accent-iris); }
.hub-cli-arrow { margin-left: auto; color: var(--muted); }
.hub-cli-switch:hover, .hub-cli-switch:focus-visible { color: var(--accent-cyan); background: var(--soft); }
.hub-cli-switch:focus-visible { outline: 1px solid var(--accent-iris); outline-offset: 3px; }

/* ---------- training log dashboard (/Status/Training/) ---------- */

.train-page {
	--train-s1: var(--accent-cyan);
	--train-s2: var(--accent-iris);
	--train-s3: var(--accent-gold);
}

html[data-theme="dark"] .train-page {
	--train-s1: #3987e5;
	--train-s2: #d95926;
	--train-s3: #199e70;
}

@media (prefers-color-scheme: dark) {
	html:not([data-theme]) .train-page {
		--train-s1: #3987e5;
		--train-s2: #d95926;
		--train-s3: #199e70;
	}
}

.train-page .page-path a {
	color: inherit;
	text-decoration: none;
}

.train-page .page-path a:hover {
	color: var(--accent-cyan);
}

.train-page[data-connection="done"] .status-connection {
	color: var(--muted);
}

.train-page[data-connection="done"] .status-dot {
	background: var(--muted);
}

.train-progress {
	margin-top: 26px;
	grid-template-columns: 56px minmax(0, 1fr) 72px;
}

.train-kpis {
	margin-top: 22px;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	border-top: 1px solid var(--hairline);
	border-left: 1px solid var(--hairline);
}

.train-kpi {
	min-width: 0;
	padding: 10px 12px 11px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	border-right: 1px solid var(--hairline);
	border-bottom: 1px solid var(--hairline);
	font-family: var(--font-mono);
}

.train-kpi-label {
	color: var(--muted);
	font-size: 8px;
	line-height: 1.3;
}

.train-kpi-value {
	color: var(--ink);
	font-size: 15px;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.train-charts {
	margin-top: 34px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 36px;
	row-gap: 30px;
}

.train-chart {
	min-width: 0;
	margin: 0;
}

.train-chart-head {
	margin-bottom: 8px;
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-family: var(--font-mono);
	font-size: 9px;
	line-height: 1.4;
}

.train-chart-title {
	color: var(--tree-open-label);
	font-weight: 600;
}

.train-chart-legend {
	display: inline-flex;
	gap: 10px;
	color: var(--muted);
}

.train-swatch,
.train-tip-row {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.train-swatch::before,
.train-tip-row i {
	content: "";
	width: 10px;
	height: 2px;
	border-radius: 1px;
	background: var(--series);
}

[data-series="ema"], [data-series="top1"], [data-series="lr"], [data-series="grad"] { --series: var(--train-s1); }
[data-series="top5"], [data-series="gpu1"] { --series: var(--train-s2); }
[data-series="gpu0"] { --series: var(--train-s1); }
[data-series="peak"] { --series: var(--train-s3); }
[data-series="mrr"] { --series: var(--train-s3); }
[data-series="raw"] { --series: var(--faint); }

.train-chart-body {
	position: relative;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 9px;
}

.train-svg {
	width: 100%;
	height: auto;
	display: block;
	overflow: visible;
	touch-action: pan-y;
}

.train-grid {
	stroke: var(--hairline);
	stroke-width: 1;
	stroke-dasharray: 2 3;
}

.train-baseline {
	stroke: var(--border-strong);
	stroke-width: 1;
}

.train-marker {
	stroke: var(--faint);
	stroke-width: 1;
	stroke-dasharray: 4 3;
}

.train-axis {
	fill: var(--faint);
	font-family: var(--font-mono);
	font-size: 8px;
	font-variant-numeric: tabular-nums;
}

.train-line {
	fill: none;
	stroke: var(--series);
	stroke-width: 2;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.train-line.is-faint {
	stroke-width: 1;
	opacity: 0.55;
}

.train-dot {
	fill: var(--series);
	stroke: var(--paper);
	stroke-width: 2;
}

.train-cross {
	stroke: var(--muted);
	stroke-width: 1;
}

.train-tip[hidden],
.train-page [hidden] {
	display: none;
}

.train-tip {
	position: absolute;
	top: 4px;
	z-index: 2;
	min-width: 96px;
	padding: 6px 8px;
	display: grid;
	gap: 3px;
	transform: translateX(-50%);
	border: 1px solid var(--border-soft);
	background: var(--surface-raised);
	color: var(--ink);
	pointer-events: none;
	font-size: 9px;
	line-height: 1.3;
}

.train-tip-step {
	color: var(--muted);
}

.train-tip-row b {
	margin-left: auto;
	padding-left: 10px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.train-heading {
	padding-bottom: 8px;
	border-bottom: 1px solid var(--hairline);
}

.train-section {
	margin-top: 40px;
	font-family: var(--font-mono);
}

.train-note {
	margin: -10px 0 12px;
	font-family: inherit;
	color: var(--muted);
	font-size: 9px;
}

.train-table-wrap {
	overflow-x: auto;
}

.train-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 9px;
	font-variant-numeric: tabular-nums;
}

article .train-table {
	margin: 0;
	border: 0;
	font-family: inherit;
}

article .train-table tbody tr:nth-child(even),
article .train-table tbody tr:hover {
	background: transparent;
}

article .train-table th,
article .train-table td {
	border-left: 0;
	border-right: 0;
	border-top: 0;
	font-family: inherit;
	font-size: 9px;
	padding: 6px 10px 6px 0;
	border-bottom: 1px solid var(--hairline);
	text-align: left;
	white-space: nowrap;
}

article .train-table th {
	background: transparent;
	color: var(--muted);
	font-weight: 500;
}

.train-delta {
	color: var(--success-text);
}

.train-delta.is-down {
	color: var(--accent-love);
}

.train-events {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 9px;
	line-height: 1.6;
}

.train-event {
	display: grid;
	grid-template-columns: 112px 128px minmax(0, 1fr);
	gap: 10px;
	padding: 3px 0;
	border-bottom: 1px dashed var(--hairline);
}

.train-event time {
	color: var(--faint);
	font-variant-numeric: tabular-nums;
}

.train-event-kind {
	color: var(--accent-iris);
}

.train-event-text {
	color: var(--body-muted);
	overflow-wrap: anywhere;
}

@media (max-width: 620px) {
	.train-kpis {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

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