/* ==========================================================================
   tokens.css — 设计令牌、重置与基础排版（所有主题共享）
   仅包含与视觉风格无关的骨架；具体配色由 themes/*.css 覆盖。
   ========================================================================== */

:root{
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	--font-serif: Georgia, "Times New Roman", "Songti SC", "Noto Serif SC", "SimSun", serif;
	--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;

	--wrap: 1180px;
	--radius: 16px;
	--radius-sm: 10px;
	--radius-pill: 999px;

	--dur: .28s;
	--ease: cubic-bezier(.22, .61, .36, 1);

	/* 兜底浅色调（Aurora），主题文件会覆盖 */
	--bg: #f6faf9;
	--bg-soft: #eef5f3;
	--surface: #ffffff;
	--surface-2: #f1f6f5;
	--text: #12211e;
	--text-strong: #071410;
	--muted: #5b6b67;
	--line: #e0ebe8;
	--line-strong: #c8d9d4;
	--accent: #0f766e;
	--accent-2: #0ea5e9;
	--accent-ink: #ffffff;
	--chip-bg: #e6f2ef;
	--chip-text: #0f5f58;
	--shadow: 0 1px 2px rgba(15, 40, 36, .04), 0 8px 24px rgba(15, 40, 36, .06);
	--shadow-hover: 0 2px 4px rgba(15, 40, 36, .06), 0 18px 40px rgba(15, 40, 36, .12);
	--header-bg: rgba(255, 255, 255, .82);
	--hero-bg: #ffffff;
	--selection: rgba(15, 118, 110, .22);
}

html[data-mode="dark"]{
	--bg: #0a1118;
	--bg-soft: #0e1720;
	--surface: #111c26;
	--surface-2: #16232e;
	--text: #e4efec;
	--text-strong: #ffffff;
	--muted: #9cb2ad;
	--line: #22323d;
	--line-strong: #33474f;
	--accent: #5eead4;
	--accent-2: #38bdf8;
	--accent-ink: #04211d;
	--chip-bg: #10312e;
	--chip-text: #8ff2e4;
	--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px rgba(0, 0, 0, .35);
	--shadow-hover: 0 2px 6px rgba(0, 0, 0, .4), 0 22px 50px rgba(0, 0, 0, .5);
	--header-bg: rgba(10, 17, 24, .78);
	--hero-bg: #111c26;
	--selection: rgba(94, 234, 212, .28);
}

*, *::before, *::after{ box-sizing: border-box; }

[hidden]{ display: none !important; }

html{
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce){
	html{ scroll-behavior: auto; }
	*, *::before, *::after{
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
}

body{
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6{
	margin: 0;
	color: var(--text-strong);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -.015em;
}

p, ul, ol, figure, blockquote{ margin: 0; }
ul, ol{ padding: 0; }
li{ list-style: none; }

a{
	color: inherit;
	text-decoration: none;
	transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

button, input, textarea, select{
	font: inherit;
	color: inherit;
}

::selection{ background: var(--selection); }

:focus-visible{
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* 屏幕阅读器专用文本 */
.sr-only{
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* 跳过导航 */
.skip-link{
	position: fixed;
	left: 16px;
	top: -100px;
	z-index: 200;
	padding: 10px 18px;
	background: var(--accent);
	color: var(--accent-ink);
	border-radius: var(--radius-sm);
	font-weight: 600;
	transition: top .2s var(--ease);
}
.skip-link:focus{
	top: 14px;
}

/* 页面水平容器 */
.wrap{
	width: min(calc(100% - 48px), var(--wrap));
	margin-inline: auto;
}
@media (max-width: 640px){
	.wrap{ width: calc(100% - 32px); }
}

/* 页面滚动定位时避开吸顶导航 */
[id]{ scroll-margin-top: 96px; }
