/* ==================================================================
   文件：public/web/lanv10/css/page-document.css
   用途：文档中心四页（document / document-details / document-view / document-result）
   说明：沿用 demo（lanwww）v2 视觉体系，三栏文档版式 + ≤900px 折叠
   ================================================================== */

/* ---------- 首屏 ---------- */
.v2d-hero {
	position: relative;
	overflow: hidden;
	padding: clamp(48px, 4.4vw, 76px) 0 clamp(40px, 3.6vw, 60px);
	background:
		radial-gradient(900px 420px at 82% -10%, rgba(27, 92, 230, .12), transparent 70%),
		linear-gradient(180deg, #F5F8FF 0%, #FFFFFF 100%);
	border-bottom: 1px solid var(--line-soft);
}
.v2d-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
	gap: 32px 48px;
	align-items: end;
}
.v2d-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--accent);
}
.v2d-eyebrow::before {
	content: "";
	width: 18px;
	height: 1px;
	background: var(--accent);
}
.v2d-title {
	margin: 12px 0 12px;
	font-size: clamp(28px, 3vw, 40px);
	font-weight: 700;
	line-height: 1.2;
	color: #12181F;
}
.v2d-desc {
	max-width: 42em;
	margin: 0;
	font-size: 14px;
	line-height: 1.9;
	color: var(--muted);
}
.v2d-hero-links {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin-top: 18px;
	font-size: 13px;
	color: var(--muted-2);
}
.v2d-hero-links b {
	font-weight: 600;
	color: var(--ink);
}

/* ---------- 搜索框 ---------- */
.v2d-search {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: var(--shadow);
}
.v2d-search input {
	flex: 1;
	min-width: 0;
	height: 40px;
	padding: 0 8px;
	font-size: 13.5px;
	color: var(--ink);
	background: transparent;
	border: 0;
	outline: 0;
}
.v2d-search input::placeholder {
	color: var(--muted-2);
}
.v2d-search .search-btn {
	flex-shrink: 0;
	height: 40px;
	padding: 0 20px;
	font-size: 14px;
	color: #fff;
	background: var(--accent);
	border-radius: 6px;
	cursor: pointer;
	transition: background .2s ease;
}
.v2d-search .search-btn:hover {
	background: var(--accent-hi);
}
.v2d-search-tip {
	margin: 10px 2px 0;
	font-size: 12px;
	color: var(--muted-2);
}

/* ---------- 三栏骨架 ---------- */
.v2d-sec {
	padding: clamp(32px, 3vw, 52px) 0 clamp(56px, 5vw, 88px);
}
.v2d-layout {
	display: grid;
	grid-template-columns: 232px minmax(0, 1fr) 284px;
	gap: clamp(20px, 2.4vw, 36px);
	align-items: start;
}
.v2d-side,
.v2d-aside {
	position: sticky;
	top: 84px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ---------- 侧栏卡片 ---------- */
.v2d-box {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 10px;
}
.v2d-box-hd {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--line-soft);
}
.v2d-box-hd h2,
.v2d-box-hd h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #12181F;
}
.v2d-box-hd span {
	font-size: 11.5px;
	color: var(--muted-2);
}
.v2d-box-bd {
	padding: 10px;
}

/* ---------- 分类树 ---------- */
.v2d-catbox > summary {
	display: none;
}
.v2d-cat-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.v2d-cat-list > li > a,
.v2d-cat-list > li > .v2d-cat-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	padding: 9px 10px;
	font-size: 13.5px;
	color: var(--ink-2);
	text-align: left;
	background: transparent;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease;
}
.v2d-cat-list > li > a:hover,
.v2d-cat-list > li > .v2d-cat-toggle:hover {
	color: var(--accent);
	background: var(--accent-soft);
}
.v2d-cat-list > li.is-active > a {
	font-weight: 600;
	color: var(--accent);
	background: var(--accent-soft);
}
.v2d-cat-list .v2d-caret {
	width: 6px;
	height: 6px;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s ease;
}
.v2d-cat-list li.is-open > .v2d-cat-toggle .v2d-caret {
	transform: rotate(225deg);
}
.v2d-cat-sub {
	display: none;
	padding: 2px 0 6px 12px;
	margin: 0 0 4px;
	list-style: none;
	border-left: 1px solid var(--line-soft);
}
.v2d-cat-list li.is-open > .v2d-cat-sub {
	display: block;
}
.v2d-cat-sub a {
	display: block;
	padding: 6px 10px;
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--muted);
	border-radius: 5px;
}
.v2d-cat-sub a:hover {
	color: var(--accent);
	background: var(--paper-2);
}

/* ---------- 右侧热门 / 导航 ---------- */
.v2d-hot-list {
	margin: 0;
	padding: 2px 0;
	list-style: none;
	counter-reset: hot;
}
.v2d-hot-list li {
	position: relative;
	padding: 9px 10px 9px 34px;
	font-size: 12.8px;
	line-height: 1.6;
	color: var(--ink-2);
	border-radius: 6px;
	transition: background-color .18s ease, color .18s ease;
	counter-increment: hot;
}
.v2d-hot-list li::before {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 16px;
	font-size: 11px;
	font-weight: 600;
	color: var(--muted-2);
	content: counter(hot, decimal-leading-zero);
}
.v2d-hot-list li:nth-child(-n+3)::before {
	color: var(--accent);
}
.v2d-hot-list li:hover {
	color: var(--accent);
	background: var(--paper-2);
}
.v2d-aside-note {
	padding: 16px;
	font-size: 12.5px;
	line-height: 1.85;
	color: var(--muted);
	background: var(--paper-3);
	border: 1px solid rgba(27, 92, 230, .12);
	border-radius: 10px;
}
.v2d-aside-note b {
	display: block;
	margin-bottom: 6px;
	font-size: 13.5px;
	color: #12181F;
}
.v2d-aside-note .v2-btn {
	margin-top: 12px;
}

/* ---------- 中间：分类卡片（document.html） ---------- */
.v2d-hd {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.v2d-hd h1,
.v2d-hd h2 {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 600;
	color: #12181F;
}
.v2d-hd p {
	margin: 0;
	font-size: 13px;
	color: var(--muted);
}
.v2d-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}
.v2d-card {
	display: flex;
	flex-direction: column;
	padding: 20px 20px 16px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 10px;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.v2d-card:hover {
	border-color: rgba(27, 92, 230, .26);
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}
.v2d-card-hd {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}
.v2d-card-no {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	flex-shrink: 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--accent);
	background: var(--accent-soft);
	border-radius: 8px;
}
.v2d-card-hd h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #12181F;
}
.v2d-card-hd em {
	display: block;
	margin-top: 2px;
	font-size: 11.5px;
	font-style: normal;
	color: var(--muted-2);
}
.v2d-card-list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.v2d-card-list a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 0;
	font-size: 13px;
	color: var(--ink-2);
	border-bottom: 1px dashed var(--line-soft);
}
.v2d-card-list li:last-child a {
	border-bottom: 0;
}
.v2d-card-list a::before {
	content: "";
	width: 3px;
	height: 3px;
	flex-shrink: 0;
	background: var(--line);
	border-radius: 50%;
}
.v2d-card-list a:hover {
	color: var(--accent);
}
.v2d-card-more {
	margin-top: auto;
	padding-top: 12px;
	font-size: 12.5px;
	color: var(--accent);
}

/* ---------- 中间：文章列表 ---------- */
.v2d-crumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	font-size: 12.5px;
	color: var(--muted-2);
}
.v2d-crumb a:hover {
	color: var(--accent);
}
.v2d-crumb i {
	font-style: normal;
	color: var(--line);
}
.v2d-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.v2d-list-item {
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 10px;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.v2d-list-item:hover {
	border-color: rgba(27, 92, 230, .26);
	box-shadow: var(--shadow-sm);
}
.v2d-list-item h3 {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 500;
	color: #12181F;
}
.v2d-list-item h3 a:hover {
	color: var(--accent);
}
.v2d-list-item p {
	margin: 0;
	font-size: 13px;
	line-height: 1.75;
	color: var(--muted);
}
.v2d-list-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-top: 10px;
	font-size: 11.5px;
	color: var(--muted-2);
}
.v2d-list-meta span::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	margin-right: 6px;
	vertical-align: middle;
	background: var(--line);
	border-radius: 50%;
}

/* ---------- 分页 ---------- */
.v2d-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 18px;
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--line-soft);
}
.v2d-pager-total {
	font-size: 12.5px;
	color: var(--muted);
}
.v2d-pager-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}
.v2d-pager-nav a,
.v2d-pager-nav span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 10px;
	font-size: 12.5px;
	color: var(--ink-2);
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 6px;
}
.v2d-pager-nav a:hover {
	color: var(--accent);
	border-color: var(--accent);
}
.v2d-pager-nav .is-active {
	color: #fff;
	background: var(--accent);
	border-color: var(--accent);
}
.v2d-pager-nav .is-disabled {
	color: var(--muted-2);
	background: var(--paper-2);
	cursor: not-allowed;
}

/* ---------- 文章详情 ---------- */
.v2d-article {
	padding: clamp(22px, 2.4vw, 34px);
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
}
.v2d-article-hd {
	padding-bottom: 18px;
	border-bottom: 1px solid var(--line-soft);
}
.v2d-article-hd h1,
.v2d-article-hd h2 {
	margin: 0 0 10px;
	font-size: clamp(22px, 2.2vw, 28px);
	font-weight: 700;
	line-height: 1.4;
	color: #12181F;
}
.v2d-article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	font-size: 12.5px;
	color: var(--muted-2);
}
.v2d-article-bd {
	padding-top: 22px;
	font-size: 14px;
	line-height: 1.95;
	color: var(--ink-2);
	word-break: break-word;
}
.v2d-article-bd h2,
.v2d-article-bd h3,
.v2d-article-bd h4 {
	margin: 28px 0 12px;
	font-weight: 600;
	color: #12181F;
	line-height: 1.45;
}
.v2d-article-bd h2 {
	padding-left: 12px;
	font-size: 19px;
	border-left: 3px solid var(--accent);
}
.v2d-article-bd h3 {
	font-size: 16.5px;
}
.v2d-article-bd p {
	margin: 0 0 14px;
}
.v2d-article-bd ul,
.v2d-article-bd ol {
	margin: 0 0 16px;
	padding-left: 20px;
	list-style: disc;
}
.v2d-article-bd ol {
	list-style: decimal;
}
.v2d-article-bd li {
	margin-bottom: 6px;
}
.v2d-article-bd img {
	height: auto;
	margin: 8px 0 16px;
	border-radius: 8px;
}
.v2d-article-bd a {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.v2d-article-bd blockquote {
	margin: 18px 0;
	padding: 14px 18px;
	font-size: 13.5px;
	color: var(--muted);
	background: var(--paper-2);
	border-left: 3px solid var(--accent);
	border-radius: 0 8px 8px 0;
}
.v2d-article-bd blockquote p:last-child {
	margin: 0;
}
.v2d-article-bd pre {
	overflow-x: auto;
	padding: 16px;
	font-family: var(--mono);
	font-size: 12.5px;
	line-height: 1.75;
	white-space: pre-wrap;
	word-wrap: break-word;
	color: #E6EDF3;
	background: #12181F;
	border-radius: 8px;
}
.v2d-article-bd code {
	padding: 2px 6px;
	font-family: var(--mono);
	font-size: 12.5px;
	background: var(--paper-2);
	border-radius: 4px;
}
.v2d-article-bd pre code {
	padding: 0;
	background: none;
}
.v2d-article-bd table {
	width: 100%;
	margin: 16px 0;
	font-size: 13px;
	border-collapse: collapse;
}
.v2d-article-bd th,
.v2d-article-bd td {
	padding: 10px 12px;
	text-align: left;
	border: 1px solid var(--line);
}
.v2d-article-bd th {
	font-weight: 600;
	color: #12181F;
	background: var(--paper-2);
}
.v2d-article-ft {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 26px;
	padding-top: 18px;
	font-size: 13px;
	color: var(--muted);
	border-top: 1px solid var(--line-soft);
}
.v2d-article-ft a {
	color: var(--ink-2);
}
.v2d-article-ft a:hover {
	color: var(--accent);
}
.v2d-article-ft b {
	font-weight: 500;
	color: var(--muted-2);
}

/* ---------- 目录（document-view） ---------- */
.v2d-toc {
	margin: 0;
	padding: 0;
	list-style: none;
}
.v2d-toc a {
	display: block;
	padding: 7px 10px;
	font-size: 12.8px;
	line-height: 1.6;
	color: var(--muted);
	border-left: 2px solid var(--line-soft);
	border-radius: 0 5px 5px 0;
}
.v2d-toc a:hover {
	color: var(--accent);
	background: var(--paper-2);
	border-left-color: var(--accent);
}
.v2d-toc a.is-active {
	font-weight: 500;
	color: var(--accent);
	border-left-color: var(--accent);
}

/* ---------- 搜索结果 ---------- */
.v2d-empty {
	padding: 48px 24px;
	text-align: center;
	background: #fff;
	border: 1px dashed var(--line);
	border-radius: 12px;
}
.v2d-empty svg {
	width: 64px;
	height: 64px;
	margin-bottom: 14px;
	color: var(--muted-2);
}
.v2d-empty h3 {
	margin: 0 0 8px;
	font-size: 15.5px;
	font-weight: 600;
	color: #12181F;
}
.v2d-empty p {
	margin: 0;
	font-size: 13px;
	color: var(--muted);
}
.v2d-empty .v2-btn {
	margin-top: 16px;
}

/* ---------- 移动端 ---------- */
@media (max-width: 1180px) {
	.v2d-layout {
		grid-template-columns: 208px minmax(0, 1fr);
	}
	.v2d-aside {
		display: none;
	}
}

@media (max-width: 900px) {
	.v2d-hero-grid {
		grid-template-columns: 1fr;
		align-items: start;
	}
	.v2d-search {
		width: 100%;
	}
	.v2d-layout {
		grid-template-columns: minmax(0, 1fr);
	}
	.v2d-side {
		position: static;
		top: auto;
	}
	.v2d-catbox {
		background: #fff;
		border: 1px solid var(--line);
		border-radius: 10px;
	}
	.v2d-catbox > summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		padding: 13px 16px;
		font-size: 13.5px;
		font-weight: 600;
		color: #12181F;
		cursor: pointer;
		list-style: none;
	}
	.v2d-catbox > summary::-webkit-details-marker {
		display: none;
	}
	.v2d-catbox > summary::after {
		content: "";
		width: 6px;
		height: 6px;
		border-right: 1px solid var(--muted);
		border-bottom: 1px solid var(--muted);
		transform: rotate(45deg);
		transition: transform .2s ease;
	}
	.v2d-catbox[open] > summary::after {
		transform: rotate(225deg);
	}
	.v2d-catbox > .v2d-box-bd {
		padding-top: 0;
		border-top: 1px solid var(--line-soft);
	}
	.v2d-cards {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 640px) {
	.v2d-hero {
		padding-top: 32px;
	}
	.v2d-title {
		font-size: 25px;
	}
	.v2d-search {
		flex-wrap: wrap;
	}
	.v2d-search input {
		flex: 1 1 100%;
	}
	.v2d-search .search-btn {
		flex: 1 1 100%;
	}
	.v2d-card,
	.v2d-article {
		padding: 16px;
	}
	.v2d-pager {
		align-items: flex-start;
		flex-direction: column;
	}
	.v2d-pager-nav {
		width: 100%;
	}
}
