/* ============================================================
   HM 门户版补充样式（v2.0.0）
   门户首页 / 面包屑 / 商城板块头 / Skill 板块
   —— 沿用商城插件的 design token（--bg / --ink / --accent / --radius ...），
      不引入任何 CSS 框架。
   ============================================================ */

/* ---------- 头部补充 ---------- */
.hm-orders-link {
	font-size: 13px;
	font-weight: 700;
	color: var(--ink-soft);
	padding: 8px 12px;
	border-radius: 9px;
}
.hm-orders-link:hover { color: var(--ink); background: var(--bg-2); }

.hm-mobile-nav { display: none; }

/* ---------- 品牌 logo：chevron 标的 + CAPADOCK 字标（GAN-53） ---------- */
/* 取代原来的手写体首字母方块：图形 = 品牌 chevron（w60 微圆档，512 网格），字 = Geist Black 全大写 */
.hm-logo { gap: 9px; }
.hm-logo .hm-logo-mark {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: auto;
	height: auto;
	background: none;
	box-shadow: none;
	color: var(--accent);
}
.hm-logo .hm-logo-mark svg { display: block; height: 26px; width: 26px; border-radius: 0; }
.hm-logo .hm-logo-word {
	font-family: var(--brand-font);
	font-weight: 900;
	font-size: 18px;
	line-height: 1.05;
	letter-spacing: var(--brand-tracking);
	text-transform: uppercase;
}
/* 页脚用同一套标，整体小一号 */
.hm-footer .hm-logo { gap: 8px; font-size: 15px; }
.hm-footer .hm-logo .hm-logo-mark svg { height: 20px; width: 20px; border-radius: 0; }
.hm-footer .hm-logo .hm-logo-word { font-size: 15px; }

/* ---------- 面包屑 ---------- */
.hm-crumbs { padding: 14px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.hm-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hm-crumbs li { display: flex; align-items: center; gap: 6px; }
.hm-crumbs li + li::before { content: "/"; color: var(--line); }
.hm-crumbs a { color: var(--ink-soft); }
.hm-crumbs a:hover { color: var(--accent-ink); }
.hm-crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- 门户首屏 ---------- */
.hm-portal-hero { padding: 46px 0 26px; }
.hm-portal-hero-in {
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	gap: 34px;
	align-items: center;
}
.hm-portal-hero h1 { font-size: 46px; letter-spacing: -.035em; margin-bottom: 16px; }
.hm-portal-hero h1 em { font-style: normal; color: var(--accent); }
.hm-portal-hero .lead { font-size: 16px; color: var(--ink-soft); max-width: 30em; margin: 0; }
.hm-portal-hero .lead b { color: var(--ink); }

.hm-portal-enter { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

.hm-portal-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: 26px;
	max-width: 520px;
}
.hm-portal-stats > div {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 12px 14px;
	box-shadow: var(--shadow);
}
.hm-portal-stats .num { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hm-portal-stats .num em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-left: 2px; }
.hm-portal-stats .lab { font-size: 11.5px; color: var(--ink-soft); }

.hm-portal-hero-side { display: grid; gap: 12px; align-content: center; }
.hm-portal-hero-side .hm-bubble { margin-left: 0 !important; transform: none !important; width: 100%; }

.hm-portal-side-note {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--violet-soft);
	border: 1px solid #d9cffa;
	border-radius: 18px;
	padding: 12px 14px;
}
.hm-portal-side-ic { font-size: 18px; }
.hm-portal-side-note strong { display: block; font-size: 14px; }
.hm-portal-side-note span { font-size: 12px; color: var(--ink-soft); }
.hm-portal-side-note a.hm-arrow { margin-left: auto; }

/* ---------- 板块入口卡 ---------- */
.hm-portal-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.hm-portal-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 22px;
	transition: transform .16s ease, box-shadow .16s ease;
	min-height: 210px;
}
a.hm-portal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.hm-portal-card--mint { background: #f2fbf7; border-color: #cdeadd; }
.hm-portal-card--lilac { background: #f7f4ff; border-color: #e0d7fb; }
.hm-portal-card--soon {
	background: repeating-linear-gradient(45deg, #fdf8f0, #fdf8f0 10px, #fbf3e8 10px, #fbf3e8 20px);
	border: 1.5px dashed #ddcdb6;
	box-shadow: none;
}
.hm-portal-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.hm-portal-card-ic {
	width: 44px; height: 44px; border-radius: 14px;
	background: var(--surface);
	border: 1px solid var(--line);
	display: grid; place-items: center;
	font-size: 20px;
	box-shadow: var(--shadow);
}
.hm-portal-card-chip {
	font-size: 11.5px; font-weight: 800;
	padding: 4px 10px; border-radius: 999px;
	background: var(--ink); color: #fff;
}
.hm-portal-card-chip--muted { background: var(--bg-2); color: var(--ink-faint); }
.hm-portal-card h3 { font-size: 20px; margin: 0 0 6px; }
.hm-portal-card p { font-size: 13px; color: var(--ink-soft); margin: 0 0 16px; }
.hm-portal-card-foot { margin-top: auto; display: flex; align-items: baseline; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.hm-portal-card-num { font-size: 24px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hm-portal-card-lab { font-size: 12px; color: var(--ink-soft); }

/* ---------- 精选分组 ---------- */
.hm-feat-group + .hm-feat-group { margin-top: 30px; }
.hm-feat-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hm-feat-group-head h3 { margin: 0; font-size: 17px; }
.hm-feat-group-head .more { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.hm-feat-group-head .more:hover { color: var(--accent); }

/* ---------- 为什么信我们 ---------- */
.hm-why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hm-why-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 22px;
	box-shadow: var(--shadow);
}
.hm-why-ic {
	width: 34px; height: 34px; border-radius: 11px;
	display: grid; place-items: center;
	font-size: 16px; font-weight: 800;
	margin-bottom: 12px;
	background: var(--accent-soft); color: var(--accent-ink);
}
.hm-why-card--mint .hm-why-ic { background: var(--ok-soft); color: var(--ok); }
.hm-why-card--sky .hm-why-ic { background: var(--info-soft); color: var(--info-ink); }
.hm-why-card--peach .hm-why-ic { background: var(--accent-soft); color: var(--accent-ink); }
.hm-why-card h3 { font-size: 18px; margin: 0 0 2px; }
.hm-why-lead { font-size: 13px; font-weight: 700; color: var(--accent-ink); margin-bottom: 8px; }
.hm-why-card p { font-size: 13px; color: var(--ink-soft); margin: 0; }

/* ---------- 最新更新 ---------- */
.hm-updates { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.hm-update-row {
	display: grid;
	grid-template-columns: 96px 84px minmax(0, 1fr) auto 20px;
	gap: 12px;
	align-items: center;
	padding: 13px 20px;
	font-size: 13.5px;
	border-bottom: 1px solid var(--line);
}
.hm-update-row:last-child { border-bottom: 0; }
.hm-update-row:hover { background: #fffdf9; }
.hm-update-date { color: var(--ink-faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.hm-update-badge { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; text-align: center; }
.hm-update-badge--store { background: var(--ok-soft); color: var(--ok); }
.hm-update-badge--skill { background: var(--violet-soft); color: var(--violet-ink); }
.hm-update-title { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-update-meta { color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; }
.hm-update-go { color: var(--ink-faint); text-align: right; }

/* ---------- 商城板块头 ---------- */
.hm-store-hero { padding: 34px 0 6px; }
.hm-store-hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center; }
.hm-store-hero h1 { font-size: 40px; letter-spacing: -.035em; margin-bottom: 10px; }
.hm-store-hero .lead { font-size: 15.5px; color: var(--ink-soft); max-width: 32em; margin: 0; }
.hm-store-hero-side { display: grid; gap: 12px; align-content: center; }
.hm-store-hero-side .hm-bubble { margin-left: 0 !important; transform: none !important; width: 100%; }

/* ---------- 分页 ---------- */
.hm-pagination { margin-top: 26px; }
.hm-pagination .page-numbers {
	display: inline-grid; place-items: center;
	min-width: 34px; height: 34px; padding: 0 10px;
	border-radius: 10px; border: 1px solid var(--line);
	background: var(--surface); font-size: 13px; font-weight: 700; color: var(--ink-soft);
	margin-right: 6px;
}
.hm-pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.hm-pagination .page-numbers:hover { border-color: #d9cdbb; color: var(--ink); }

/* ============================================================
   Skill 板块
   ============================================================ */

/* 列表页头 */
.hm-skill-hero { padding: 26px 0 20px; max-width: 760px; }
.hm-skill-hero h1 { font-size: 40px; letter-spacing: -.035em; margin-bottom: 8px; }
.hm-skill-hero-lead { font-size: 15.5px; color: var(--ink-soft); margin: 0; }
.hm-skill-hero-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.hm-skill-hero-pill {
	font-size: 12px; font-weight: 700;
	padding: 5px 12px; border-radius: 999px;
	background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
}
.hm-skill-hero-pill--accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }

/* 筛选条 */
.hm-filter {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 16px 20px 8px;
	margin-bottom: 18px;
}
.hm-filter-row { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.hm-filter-label { font-size: 12px; font-weight: 800; color: var(--ink-faint); letter-spacing: .04em; padding-top: 9px; white-space: nowrap; }
.hm-filter .hm-chips { margin: 0; }
.hm-filter-reset { padding: 0 0 8px 0; font-size: 12.5px; }
.hm-filter-reset a { color: var(--ink-faint); }
.hm-filter-reset a:hover { color: var(--accent-ink); }

/* 列表头（计数 + 搜索） */
.hm-skill-list-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 14px; flex-wrap: wrap; }
.hm-search input { min-width: 0; }
.hm-search--sm { margin: 0; padding: 4px 4px 4px 14px; max-width: 300px; flex: 0 1 300px; }
.hm-search--sm input { padding: 4px 0; font-size: 13px; }
.hm-search--sm button { width: 32px; height: 32px; font-size: 13px; }

/* 栅格 + 卡片 */
.hm-skill-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hm-skill-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 18px;
	transition: transform .16s ease, box-shadow .16s ease;
}
.hm-skill-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.hm-skill-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.hm-skill-ic {
	width: 38px; height: 38px; border-radius: 12px;
	background: var(--bg-2);
	display: grid; place-items: center;
	font-size: 18px;
	flex: 0 0 auto;
}
.hm-skill-ic--lg { width: 58px; height: 58px; border-radius: 18px; font-size: 26px; }
.hm-skill-chip { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.hm-skill-chip--free { background: var(--ok-soft); color: var(--ok); }
.hm-skill-chip--paid { background: var(--violet-soft); color: var(--violet-ink); }
.hm-skill-card h3 { font-size: 15.5px; margin: 0 0 4px; line-height: 1.3; }
.hm-skill-sub { font-size: 12px; color: var(--ink-soft); min-height: 2.6em; }
.hm-skill-excerpt { font-size: 12px; color: #5b5666; margin: 8px 0 0; }
.hm-skill-card-foot {
	margin-top: auto;
	padding-top: 12px;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px;
	border-top: 1px dashed var(--line);
}
.hm-skill-price { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.hm-skill-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; font-size: 10.5px; color: var(--ink-faint); }
.hm-skill-cat { color: var(--accent-ink); font-weight: 700; }

/* 详情页 */
.hm-skill-single .hm-product-top { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 30px; }
.hm-skill-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.hm-skill-head-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--ink-faint); margin-bottom: 6px; }
.hm-skill-head .hm-product-title { font-size: 32px; margin-bottom: 6px; }
.hm-skill-head .hm-product-sub { margin-bottom: 0; }
.hm-skill-lead { font-size: 15px; color: var(--ink-soft); margin: 0 0 6px; }

.hm-skill-block { margin-top: 26px; }
.hm-skill-block h2 { font-size: 21px; margin: 0 0 12px; }
.hm-skill-body { color: var(--ink-soft); font-size: 14.5px; }
.hm-skill-body p:last-child { margin-bottom: 0; }

.hm-skill-includes { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.hm-skill-includes li { position: relative; padding-left: 26px; font-size: 14px; }
.hm-skill-includes li::before {
	content: "✓";
	position: absolute; left: 0; top: 1px;
	width: 17px; height: 17px; border-radius: 50%;
	background: var(--ok-soft); color: var(--ok);
	font-size: 10.5px; font-weight: 800;
	display: grid; place-items: center;
}

.hm-skill-samples { display: grid; gap: 14px; }
.hm-skill-sample {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.hm-skill-sample-title { font-size: 12.5px; font-weight: 800; color: var(--accent-ink); padding: 10px 16px; background: var(--accent-soft); }
.hm-skill-sample-body {
	margin: 0; padding: 14px 16px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12.5px; line-height: 1.7;
	color: #4a4557; white-space: pre-wrap; word-break: break-word;
	background: #fffdf9;
}

.hm-skill-howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hm-skill-howto li { display: flex; gap: 12px; align-items: flex-start; }
.hm-skill-step-no {
	width: 24px; height: 24px; border-radius: 8px; flex: 0 0 auto;
	background: var(--ink); color: #fff;
	display: grid; place-items: center;
	font-size: 12px; font-weight: 800;
}
.hm-skill-howto strong { display: block; font-size: 14px; }
.hm-skill-howto span { font-size: 13px; color: var(--ink-soft); }

.hm-skill-changelog { display: grid; gap: 8px; }
.hm-skill-log { display: grid; grid-template-columns: 70px 92px minmax(0, 1fr); gap: 10px; font-size: 13px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.hm-skill-log:last-child { border-bottom: 0; }
.hm-skill-log-ver { font-weight: 800; color: var(--ink); }
.hm-skill-log-date { color: var(--ink-faint); font-size: 12.5px; }
.hm-skill-log-note { color: var(--ink-soft); }

/* 定价 / 会员态 */
.hm-skill-buy { padding: 20px; }
.hm-skill-buy-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hm-skill-buy-head h3 { margin: 0; }
.hm-skill-state-line {
	font-size: 12.5px; font-weight: 700;
	padding: 9px 12px; border-radius: 11px;
	background: var(--bg-2); color: var(--ink-soft);
	margin-bottom: 12px;
}
.hm-skill-state-line--ok { background: var(--ok-soft); color: var(--ok); }
.hm-skill-state-line--life { background: var(--ink); color: #fff; }

.hm-skill-plans { display: grid; gap: 10px; }
.hm-skill-plan {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	border: 1.5px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	padding: 12px 14px;
}
.hm-skill-plan--life {
	background: var(--accent-wash);
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-ring-soft);
}
.hm-skill-plan-label { font-size: 13.5px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.hm-skill-plan-tag {
	font-size: 10px; font-weight: 800;
	padding: 2px 7px; border-radius: 999px;
	background: var(--accent); color: #fff;
}
.hm-skill-plan-note { font-size: 11.5px; color: var(--ink-soft); }
.hm-skill-plan-price { font-size: 18px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hm-skill-plan-price em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink-soft); margin-left: 3px; }

.hm-skill-buy-actions { display: grid; gap: 8px; margin: 14px 0 0; }
.hm-btn--ok { background: var(--ok); box-shadow: 0 4px 0 #145c37; color: #fff; }
.hm-btn--ok:hover { background: #176138; box-shadow: 0 2px 0 #145c37; }

.hm-skill-free { margin-bottom: 12px; }
.hm-skill-free .hm-price { font-size: 30px; color: var(--ok); }

.hm-skill-demo { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.hm-skill-demo-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.hm-skill-demo-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.hm-skill-demo-chips a {
	font-size: 11.5px; font-weight: 700;
	padding: 5px 10px; border-radius: 999px;
	background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
}
.hm-skill-demo-chips a.is-current { background: var(--ink); border-color: var(--ink); color: #fff; }
.hm-skill-demo-note { font-size: 11px; color: var(--ink-faint); margin-top: 8px; line-height: 1.5; }

.hm-skill-related { margin-top: 44px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1100px) {
	.hm-skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	.hm-portal-hero { padding: 30px 0 16px; }
	.hm-portal-hero h1 { font-size: 34px; }
	.hm-portal-hero-in, .hm-store-hero-in { grid-template-columns: 1fr; gap: 22px; }
	.hm-portal-cards { grid-template-columns: 1fr; }
	.hm-portal-card { min-height: 0; }
	.hm-why-grid { grid-template-columns: 1fr; }
	.hm-skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hm-skill-single .hm-product-top { grid-template-columns: 1fr; }
	.hm-skill-buy { position: static !important; }
	.hm-skill-hero h1, .hm-store-hero h1 { font-size: 32px; }

	/* 移动端板块条 */
	.hm-mobile-nav {
		display: flex;
		gap: 6px;
		overflow-x: auto;
		padding: 8px 16px;
		border-top: 1px solid var(--line);
		background: rgba(251, 246, 236, .96);
		-webkit-overflow-scrolling: touch;
	}
	.hm-mobile-nav::-webkit-scrollbar { display: none; }
	.hm-mobile-nav a {
		flex: 0 0 auto;
		font-size: 12.5px; font-weight: 700;
		padding: 6px 12px; border-radius: 999px;
		background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
	}
	.hm-mobile-nav a.is-current { background: var(--ink); border-color: var(--ink); color: #fff; }

	.hm-update-row { grid-template-columns: 84px 72px minmax(0, 1fr); }
	.hm-update-meta, .hm-update-go { display: none; }
	.hm-filter-row { flex-direction: column; gap: 8px; }
	.hm-filter-label { padding-top: 0; }
}

@media (max-width: 620px) {
	.hm-portal-hero h1 { font-size: 28px; }
	.hm-portal-stats { grid-template-columns: 1fr; }
	.hm-skill-grid { grid-template-columns: 1fr; }
	.hm-skill-head { gap: 12px; }
	.hm-skill-ic--lg { width: 46px; height: 46px; border-radius: 14px; font-size: 21px; }
	.hm-skill-head .hm-product-title { font-size: 25px; }
	.hm-skill-log { grid-template-columns: 62px 80px minmax(0, 1fr); }
	.hm-orders-link { display: none; }
	.hm-update-row { grid-template-columns: auto minmax(0, 1fr); justify-items: start; padding: 12px 16px; }
	.hm-update-date { grid-column: 1; }
	.hm-update-badge { grid-column: 2; }
	.hm-update-title { grid-column: 1 / -1; white-space: normal; }
	.hm-skill-plan { flex-direction: column; align-items: flex-start; gap: 4px; }
}
