/* =============================================================
   LIDA base —  reset / 排版基础（01-§2 字号阶梯、§8 响应式与无障碍）
   ============================================================= */
@layer base {

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

	html {
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}

	@media (prefers-reduced-motion: no-preference) {
		html {
			scroll-behavior: smooth;
		}
	}

	body {
		margin: 0;
		min-height: 100vh;
		display: flex;
		flex-direction: column;
		background: var(--lida-bg-0);
		color: var(--lida-text-1);
		font-family: var(--lida-font);
		font-size: var(--lida-fs-body);
		font-weight: 400;
		line-height: var(--lida-lh-body);
		overflow-x: clip;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}

	.lida-main {
		flex: 1 1 auto;
		width: 100%;
	}

	/* ---- 标题：中文 700 / 拉丁 Archivo（禁斜体，01-§2） ---- */
	h1, h2, h3, h4, h5, h6 {
		margin: 0 0 0.5em;
		font-family: var(--lida-font);
		font-weight: 700;
		line-height: var(--lida-lh-head);
		color: var(--lida-text-1);
		font-style: normal;
		text-wrap: balance;
	}

	h1 { font-size: var(--lida-fs-h1-m); }
	h2 { font-size: var(--lida-fs-h2-m); }
	h3 { font-size: var(--lida-fs-h3-m); }

	@media (min-width: 768px) {
		h1 { font-size: clamp(var(--lida-fs-h1-m), 5vw, var(--lida-fs-h1)); }
		h2 { font-size: var(--lida-fs-h2); }
		h3 { font-size: var(--lida-fs-h3); }
	}

	p {
		margin: 0 0 1em;
	}

	/* 正文次级说明文字 */
	.lida-text-2, .lida-section-head__sub { color: var(--lida-text-2); }

	a {
		color: var(--lida-text-1);
		text-decoration: none;
		transition: color var(--lida-dur-fast) ease;
	}

	a:hover {
		color: var(--lida-blue);
	}

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

	/* ---- 焦点可见（描边蓝，不用 outline:none，01-§8） ---- */
	:focus-visible {
		outline: 2px solid var(--lida-blue);
		outline-offset: 2px;
		border-radius: var(--lida-radius-tag);
	}

	::selection {
		background: var(--lida-blue);
		color: var(--lida-text-1);
	}

	/* ---- 键盘访问辅助 ---- */
	.screen-reader-text {
		border: 0;
		clip-path: inset(50%);
		height: 1px;
		margin: -1px;
		overflow: hidden;
		padding: 0;
		position: absolute !important;
		width: 1px;
		word-wrap: normal !important;
	}

	.lida-skip {
		position: absolute;
		inset-inline-start: 16px;
		top: -64px;
		z-index: 200;
		padding: 12px 20px;
		background: var(--lida-blue);
		color: var(--lida-text-1);
		border-radius: var(--lida-radius-btn);
		font-size: var(--lida-fs-aux);
		transition: top var(--lida-dur-fast) ease;
	}

	.lida-skip:focus {
		top: 12px;
		color: var(--lida-text-1);
	}

	/* ---- 引用 WP 核心分页样式兜底 ---- */
	.nav-links {
		display: flex;
		gap: var(--lida-gap);
		flex-wrap: wrap;
		margin-top: var(--lida-divider-gap);
	}

	.nav-links a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
		padding: 0 16px;
		border: var(--lida-border);
		border-radius: var(--lida-radius-btn);
		color: var(--lida-text-2);
	}

	.nav-links a:hover,
	.nav-links .current {
		border-color: var(--lida-blue);
		color: var(--lida-text-1);
	}
}
