/* ==================================================================
 * 挖矿软件管理 — 归档页（/mining-software/）样式
 *
 * 与详情页 frontend.css 共用同一套视觉语言：
 *   深色渐变 Hero + 蓝色 accent + 白底圆角卡片 + 顶部 3px 色条
 * 版式：
 *   >=1024  4 列图标卡片网格
 *   768-1023 3 列
 *   480-767  2 列
 *   <480     单列
 * ================================================================== */

/* ---------------- 容器 ---------------- */
.msm-archive {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px 56px;
}
.msm-archive,
.msm-archive * { box-sizing: border-box; }

/* 面包屑（自带样式，不依赖 frontend.css 是否加载） */
.msm-archive .msm-breadcrumb {
	padding: 14px 0 0;
	font-size: 13px;
	color: #64748b;
}
.msm-archive .msm-breadcrumb ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
}
.msm-archive .msm-breadcrumb li + li::before {
	content: "›";
	margin-right: 6px;
	color: #cbd5e1;
}
.msm-archive .msm-breadcrumb a {
	color: #2563eb;
	text-decoration: none;
}
.msm-archive .msm-breadcrumb a:hover { text-decoration: underline; }
.msm-archive .msm-breadcrumb [aria-current="page"] { color: #334155; }

/* ---------------- 栏目 Hero ---------------- */
.msm-archive-hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(37, 99, 235, 0.35), transparent 55%),
		linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #243449 100%);
	color: #fff;
	padding: 38px 30px 34px;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
	margin: 14px 0 24px;
}
.msm-archive-hero::after {
	content: "";
	position: absolute;
	left: 30px;
	bottom: 0;
	width: 120px;
	height: 4px;
	border-radius: 4px 4px 0 0;
	background: #2563eb;
}
.msm-archive-title {
	margin: 0 0 12px;
	font-size: 2.05rem;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #fff;
}
.msm-archive-lead {
	margin: 0;
	max-width: 780px;
	font-size: 1rem;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.82);
}
.msm-archive-stats {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 26px;
	margin: 20px 0 0;
	padding: 0;
}
.msm-archive-stats li {
	display: flex;
	align-items: baseline;
	gap: 6px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.72);
}
.msm-archive-stats strong {
	font-size: 1.5rem;
	font-weight: 800;
	color: #fff;
	line-height: 1;
}

/* ---------------- 卡片网格 ---------------- */
.msm-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.msm-card {
	position: relative;
	display: flex;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-top: 3px solid #2563eb;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.msm-card:hover,
.msm-card:focus-within {
	transform: translateY(-3px);
	border-color: #bfdbfe;
	border-top-color: #1d4ed8;
	box-shadow: 0 14px 30px rgba(15, 23, 42, 0.13);
}
/* 整卡可点的透明覆盖层（不进入 tab 顺序） */
.msm-card-hit {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	border-radius: 14px;
}
.msm-card-inner {
	position: relative;
	z-index: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
	width: 100%;
	padding: 15px 15px 14px;
}

.msm-card-top {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}
.msm-card-icon {
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	overflow: hidden;
	background: #f1f5f9;
}
.msm-card-icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.msm-card-initial {
	font-size: 20px;
	font-weight: 800;
	color: #2563eb;
	text-transform: uppercase;
	line-height: 1;
}
.msm-card-title {
	position: relative;
	z-index: 2;
	margin: 0;
	min-width: 0;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.35;
	color: #0f172a;
}
.msm-card-title a {
	color: inherit;
	text-decoration: none;
	/* 让标题链接只在文字区域可点，卡片空白处交给覆盖层 */
	display: inline;
}
.msm-card-title a:hover { color: #1d4ed8; }

.msm-card-desc {
	margin: 0;
	font-size: 12.8px;
	line-height: 1.65;
	color: #64748b;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.msm-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 2px 0 0;
	padding: 0;
}
.msm-tag {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 6px;
	background: #f1f5f9;
	color: #475569;
	font-size: 11.5px;
	line-height: 1.5;
	white-space: nowrap;
}
.msm-tag-ver {
	background: #eff6ff;
	color: #1d4ed8;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.msm-tag-algo {
	background: #f0fdfa;
	color: #0f766e;
}

.msm-archive-empty {
	padding: 40px 0;
	text-align: center;
	color: #64748b;
}

/* ---------------- 分页 ---------------- */
.msm-paging { margin: 30px 0 0; }
.msm-paging ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
}
.msm-paging a,
.msm-paging span {
	display: inline-block;
	min-width: 38px;
	padding: 8px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 9px;
	background: #fff;
	color: #334155;
	font-size: 13.5px;
	text-align: center;
	text-decoration: none;
}
.msm-paging a:hover {
	border-color: #93c5fd;
	color: #1d4ed8;
}
.msm-paging .current {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
	font-weight: 700;
}

/* ---------------- 算法 / 系统 浏览入口 ---------------- */
.msm-archive-facets {
	margin: 34px 0 0;
	padding: 20px 20px 18px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.msm-archive-facets h2 {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}
.msm-archive-facets h2 + .msm-facet-row { margin-bottom: 16px; }
.msm-facet-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}
.msm-facet-row:last-child { margin-bottom: 0; }
.msm-facet {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #f8fafc;
	color: #334155;
	font-size: 12.8px;
	text-decoration: none;
	transition: 0.16s ease;
}
.msm-facet:hover {
	background: #eff6ff;
	border-color: #93c5fd;
	color: #1d4ed8;
}
.msm-facet-n {
	display: inline-block;
	margin-left: 6px;
	padding: 0 5px;
	border-radius: 5px;
	background: #e2e8f0;
	color: #64748b;
	font-size: 11px;
	font-variant-numeric: tabular-nums;
}
.msm-facet:hover .msm-facet-n { background: #dbeafe; color: #1d4ed8; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1023px) {
	.msm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.msm-archive-hero { padding: 32px 24px 28px; }
	.msm-archive-hero::after { left: 24px; }
	.msm-archive-title { font-size: 1.85rem; }
}

@media (max-width: 767px) {
	.msm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.msm-card-inner { padding: 13px 12px 12px; gap: 8px; }
	.msm-card-icon { flex-basis: 44px; width: 44px; height: 44px; border-radius: 12px; }
	.msm-card-title { font-size: 14.5px; }
	.msm-card-desc { font-size: 12.2px; -webkit-line-clamp: 3; }
}

@media (max-width: 600px) {
	.msm-archive { padding: 0 12px 40px; }
	.msm-archive-hero { padding: 26px 18px 24px; border-radius: 14px; margin-bottom: 18px; }
	.msm-archive-hero::after { left: 18px; }
	.msm-archive-title { font-size: 1.6rem; }
	.msm-archive-lead { font-size: 0.94rem; line-height: 1.7; }
	.msm-archive-stats { gap: 8px 18px; margin-top: 16px; }
	.msm-archive-stats strong { font-size: 1.3rem; }
	.msm-archive-facets { padding: 16px 14px 14px; }
}

@media (max-width: 480px) {
	.msm-grid { grid-template-columns: 1fr; }
	.msm-card-desc { -webkit-line-clamp: 2; }
}
