/* ==========================================================================
   霓虹矩阵 · 页面模板层
   ========================================================================== */

/* ---------- 首页 ---------- */
.nm-front-section {
	margin-bottom: clamp(34px, 4.2vw, 62px);
}

.nm-split {
	display: grid;
	gap: clamp(20px, 2.4vw, 34px);
	grid-template-columns: minmax(0, 1fr) 320px;
}

.nm-split--reverse {
	grid-template-columns: 300px minmax(0, 1fr);
}

.nm-split__aside {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

@media (max-width: 1024px) {
	.nm-split,
	.nm-split--reverse {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* 首页侧栏内的小卡片 */
.nm-mini-panel {
	background: linear-gradient(165deg, rgba(17, 27, 50, 0.9), rgba(10, 16, 32, 0.94));
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius);
	padding: 18px;
}

.nm-mini-panel__title {
	color: var(--nm-text);
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 12px;
}

.nm-mini-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nm-mini-list li {
	border-bottom: 1px dashed var(--nm-border-soft);
	margin: 0;
	padding: 9px 0;
}

.nm-mini-list li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.nm-mini-list a {
	color: var(--nm-muted-strong);
	font-size: 13px;
	line-height: 1.55;
}

.nm-mini-list a:hover {
	color: var(--nm-cyan);
}

.nm-mini-list .nm-muted {
	display: block;
	font-size: 11px;
	margin-top: 2px;
}

/* 新手入门 */
.nm-guide-list {
	display: grid;
	gap: 10px;
	counter-reset: guide;
}

.nm-guide-item {
	align-items: center;
	background: rgba(13, 20, 40, 0.6);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius-sm);
	counter-increment: guide;
	display: flex;
	gap: 14px;
	padding: 14px 16px;
	transition: border-color var(--nm-dur) var(--nm-ease), background-color var(--nm-dur) var(--nm-ease);
}

.nm-guide-item:hover {
	background: rgba(0, 229, 255, 0.05);
	border-color: var(--nm-border-strong);
}

.nm-guide-item::before {
	color: rgba(0, 229, 255, 0.45);
	content: counter(guide, decimal-leading-zero);
	font-family: var(--nm-font-mono);
	font-size: 15px;
}

.nm-guide-item__title {
	color: var(--nm-text);
	flex: 1;
	font-size: 14px;
	line-height: 1.55;
}

.nm-guide-item__meta {
	color: var(--nm-muted);
	font-size: 11px;
	white-space: nowrap;
}

/* 内链索引 */
.nm-index-grid {
	display: grid;
	gap: 22px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nm-index-col h3 {
	color: var(--nm-cyan);
	font-size: 13px;
	letter-spacing: 0.08em;
	margin-bottom: 10px;
}

.nm-index-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nm-index-col li {
	margin-bottom: 7px;
}

.nm-index-col a {
	color: var(--nm-muted);
	font-size: 12px;
}

.nm-index-col a:hover {
	color: var(--nm-cyan);
}

@media (max-width: 900px) {
	.nm-index-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.nm-index-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- 文章详情 ---------- */
.nm-article {
	min-width: 0;
}

.nm-article__head {
	margin-bottom: 24px;
}

.nm-article__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.nm-article__title {
	font-size: clamp(26px, 3vw, 42px);
	line-height: 1.3;
	margin-bottom: 16px;
}

.nm-article__meta {
	align-items: center;
	color: var(--nm-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 12px;
	gap: 16px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--nm-border-soft);
}

.nm-article__meta span {
	align-items: center;
	display: inline-flex;
	gap: 5px;
}

.nm-article__meta svg {
	height: 13px;
	width: 13px;
}

.nm-article__cover {
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius);
	margin-bottom: 24px;
	overflow: hidden;
}

.nm-article__cover img {
	display: block;
	width: 100%;
}

.nm-article__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 20px 0 0;
}

.nm-article__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 26px;
}

.nm-article__foot {
	border-top: 1px solid var(--nm-border);
	margin-top: 30px;
	padding-top: 22px;
}

.nm-authorbox {
	align-items: flex-start;
	background: rgba(13, 20, 40, 0.7);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius);
	display: flex;
	gap: 14px;
	margin-top: 30px;
	padding: 18px;
}

.nm-authorbox img {
	border-radius: 50%;
	flex-shrink: 0;
	height: 52px;
	width: 52px;
}

.nm-authorbox__name {
	color: var(--nm-text);
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 4px;
}

.nm-authorbox__bio {
	color: var(--nm-muted);
	font-size: 12px;
	line-height: 1.7;
	margin: 0;
}

.nm-article__sidebar {
	position: sticky;
	top: calc(var(--nm-header-h) + 20px);
}

@media (max-width: 1080px) {
	.nm-article__sidebar {
		position: static;
	}
}

/* ---------- 项目详情 ---------- */
.nm-detail-hero {
	background:
		radial-gradient(700px 320px at 12% 0%, rgba(0, 229, 255, 0.12), transparent 65%),
		linear-gradient(160deg, rgba(17, 27, 50, 0.94), rgba(9, 15, 30, 0.96));
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius-lg);
	margin-bottom: 26px;
	overflow: hidden;
	padding: clamp(22px, 3vw, 38px);
	position: relative;
}

.nm-detail-hero::after {
	border: 1px solid rgba(0, 229, 255, 0.12);
	border-radius: 50%;
	content: "";
	height: 260px;
	position: absolute;
	right: -80px;
	top: -110px;
	width: 260px;
}

.nm-detail-hero__eyebrow {
	color: var(--nm-cyan);
	font-family: var(--nm-font-mono);
	font-size: 11px;
	letter-spacing: 0.22em;
	margin-bottom: 12px;
	text-transform: uppercase;
}

.nm-detail-hero h1 {
	font-size: clamp(25px, 2.7vw, 38px);
	margin-bottom: 12px;
	max-width: 900px;
}

.nm-detail-hero__summary {
	color: var(--nm-muted-strong);
	font-size: var(--nm-fs-base);
	max-width: 820px;
}

.nm-detail-hero__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.nm-detail-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 20px;
}

.nm-detail-body {
	min-width: 0;
}

.nm-detail-block {
	background: rgba(13, 20, 40, 0.58);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius);
	margin-bottom: 22px;
	padding: clamp(18px, 2.2vw, 26px);
}

.nm-detail-block__title {
	align-items: center;
	display: flex;
	font-size: 18px;
	gap: 10px;
	margin-bottom: 14px;
}

.nm-detail-block__title::before {
	background: linear-gradient(180deg, var(--nm-cyan), var(--nm-purple));
	border-radius: 2px;
	content: "";
	height: 18px;
	width: 3px;
}

.nm-detail-block__title small {
	color: var(--nm-muted);
	font-family: var(--nm-font-mono);
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 0.16em;
	margin-left: auto;
}

.nm-checklist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nm-checklist li {
	color: var(--nm-muted-strong);
	font-size: 14px;
	margin: 0;
	padding: 7px 0 7px 24px;
	position: relative;
}

.nm-checklist li::before {
	color: var(--nm-cyan);
	content: "▹";
	left: 4px;
	position: absolute;
}

.nm-risk-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nm-risk-list li {
	align-items: flex-start;
	border-bottom: 1px dashed rgba(255, 180, 84, 0.18);
	color: var(--nm-muted-strong);
	display: flex;
	font-size: 13px;
	gap: 10px;
	line-height: 1.7;
	margin: 0;
	padding: 9px 0;
}

.nm-risk-list li::before {
	color: var(--nm-warning);
	content: "!";
	font-family: var(--nm-font-mono);
	font-weight: 700;
}

.nm-source-note {
	color: var(--nm-muted);
	font-size: 11px;
	margin-top: 14px;
}

/* 项目详情侧栏 */
.nm-detail-aside {
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: sticky;
	top: calc(var(--nm-header-h) + 20px);
}

.nm-detail-aside .nm-widget {
	padding: 18px;
}

.nm-detail-aside__price {
	color: var(--nm-text);
	font-size: 22px;
	font-weight: 700;
	margin: 4px 0 10px;
}

@media (max-width: 1080px) {
	.nm-detail-aside {
		position: static;
	}
}

/* 项目更新时间 */
.nm-updated {
	align-items: center;
	color: var(--nm-muted);
	display: flex;
	font-size: 11px;
	gap: 6px;
}

.nm-updated::before {
	background: var(--nm-success);
	border-radius: 50%;
	content: "";
	height: 5px;
	width: 5px;
}

/* ---------- 工具详情 ---------- */
.nm-tool-hero {
	align-items: flex-start;
	display: flex;
	gap: 18px;
	justify-content: space-between;
}

.nm-tool-hero__logo {
	align-items: center;
	background: linear-gradient(145deg, rgba(0, 229, 255, 0.14), rgba(168, 85, 247, 0.18));
	border: 1px solid rgba(0, 229, 255, 0.3);
	border-radius: 16px;
	color: var(--nm-cyan);
	display: flex;
	flex-shrink: 0;
	font-size: 30px;
	font-weight: 800;
	height: 72px;
	justify-content: center;
	width: 72px;
}

/* ---------- 专题详情 ---------- */
.nm-topic-hero {
	background:
		radial-gradient(600px 300px at 90% 0%, rgba(255, 60, 172, 0.14), transparent 60%),
		linear-gradient(150deg, rgba(20, 16, 48, 0.94), rgba(8, 14, 30, 0.96));
	border: 1px solid rgba(168, 85, 247, 0.28);
	border-radius: var(--nm-radius-lg);
	margin-bottom: 26px;
	padding: clamp(24px, 3vw, 42px);
}

.nm-topic-hero h1 {
	font-size: clamp(27px, 3vw, 42px);
	max-width: 900px;
}

.nm-topic-nav {
	display: grid;
	gap: 8px;
}

.nm-topic-nav a {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--nm-border);
	border-radius: 8px;
	color: var(--nm-muted-strong);
	font-size: 13px;
	padding: 9px 13px;
}

.nm-topic-nav a:hover {
	border-color: var(--nm-border-strong);
	color: var(--nm-cyan);
}

/* ---------- 归档 / 搜索 ---------- */
.nm-archive-head {
	background:
		linear-gradient(140deg, rgba(0, 229, 255, 0.06), rgba(168, 85, 247, 0.07)),
		rgba(13, 20, 40, 0.7);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius-lg);
	margin-bottom: 26px;
	padding: clamp(22px, 2.8vw, 34px);
}

.nm-archive-head h1 {
	font-size: clamp(24px, 2.6vw, 36px);
	margin-bottom: 8px;
}

.nm-archive-head__meta {
	color: var(--nm-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 12px;
	gap: 14px;
	margin-top: 12px;
}

.nm-search-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.nm-search-form {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
	max-width: 640px;
}

.nm-search-form input[type="search"] {
	flex: 1;
}

.nm-search-result {
	display: grid;
	gap: 14px;
}

.nm-search-item {
	background: rgba(13, 20, 40, 0.62);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius);
	display: grid;
	gap: 16px;
	grid-template-columns: 150px minmax(0, 1fr);
	padding: 14px;
}

.nm-search-item__media {
	background: #0b1224;
	border-radius: 8px;
	display: block;
	overflow: hidden;
	position: relative;
}

.nm-search-item__media img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.nm-search-item__type {
	color: var(--nm-cyan);
	font-size: 10px;
	letter-spacing: 0.12em;
	margin-bottom: 5px;
}

.nm-search-item__title {
	font-size: 17px;
	margin-bottom: 6px;
}

.nm-search-item__title a {
	color: var(--nm-text);
}

.nm-search-item__title a:hover {
	color: var(--nm-cyan);
}

.nm-search-item__excerpt {
	color: var(--nm-muted);
	font-size: 13px;
	line-height: 1.7;
	margin: 0;
}

.nm-search-item mark {
	background: rgba(0, 229, 255, 0.2);
	border-radius: 2px;
	color: #b9f8ff;
	padding: 0 2px;
}

@media (max-width: 640px) {
	.nm-search-item {
		grid-template-columns: 96px minmax(0, 1fr);
	}

	.nm-search-item__media {
		max-height: 86px;
	}
}

/* ---------- 作者页 ---------- */
.nm-author-head {
	align-items: center;
	display: flex;
	gap: 18px;
	margin-bottom: 26px;
}

.nm-author-head img {
	border: 2px solid rgba(0, 229, 255, 0.3);
	border-radius: 50%;
	height: 80px;
	width: 80px;
}

/* ---------- 账户中心 ---------- */
.nm-account {
	display: grid;
	gap: 22px;
	grid-template-columns: 250px minmax(0, 1fr);
}

.nm-account__nav {
	background: rgba(13, 20, 40, 0.72);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius);
	height: fit-content;
	overflow: hidden;
	padding: 8px;
	position: sticky;
	top: calc(var(--nm-header-h) + 20px);
}

.nm-account__nav a {
	border-radius: 8px;
	color: var(--nm-muted-strong);
	display: flex;
	font-size: 13px;
	gap: 8px;
	padding: 10px 12px;
}

.nm-account__nav a:hover,
.nm-account__nav a.is-active {
	background: rgba(0, 229, 255, 0.08);
	color: var(--nm-cyan);
}

.nm-account__body {
	min-width: 0;
}

.nm-account__panel {
	background: rgba(13, 20, 40, 0.62);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius);
	padding: clamp(18px, 2.4vw, 26px);
}

.nm-account__panel + .nm-account__panel {
	margin-top: 18px;
}

.nm-account__hello {
	color: var(--nm-muted);
	font-size: 13px;
	margin-bottom: 4px;
}

.nm-account__name {
	font-size: 24px;
	margin-bottom: 18px;
}

.nm-account__stats {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 20px;
}

.nm-account__stat {
	background: rgba(17, 27, 50, 0.8);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius-sm);
	padding: 14px;
}

.nm-account__stat strong {
	color: var(--nm-cyan);
	display: block;
	font-size: 22px;
	line-height: 1.3;
}

.nm-account__stat span {
	color: var(--nm-muted);
	font-size: 11px;
}

.nm-notice-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nm-notice-item {
	background: rgba(17, 27, 50, 0.55);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius-sm);
	margin-bottom: 10px;
	padding: 14px 16px;
}

.nm-notice-item.is-unread {
	border-left: 3px solid var(--nm-cyan);
}

.nm-notice-item__title {
	color: var(--nm-text);
	font-size: 14px;
	font-weight: 600;
}

.nm-notice-item__time {
	color: var(--nm-muted);
	font-size: 11px;
}

.nm-notice-item__content {
	color: var(--nm-muted);
	font-size: 13px;
	margin-top: 4px;
}

@media (max-width: 900px) {
	.nm-account {
		grid-template-columns: 1fr;
	}

	.nm-account__nav {
		display: flex;
		gap: 4px;
		overflow-x: auto;
		position: static;
	}

	.nm-account__nav a {
		white-space: nowrap;
	}
}

/* ---------- 404 ---------- */
.nm-404 {
	padding: clamp(40px, 7vw, 90px) 0;
	text-align: center;
}

.nm-404__code {
	background: linear-gradient(100deg, var(--nm-cyan), var(--nm-purple), var(--nm-magenta));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-family: var(--nm-font-mono);
	font-size: clamp(80px, 16vw, 170px);
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1;
}

.nm-404 h1 {
	font-size: clamp(22px, 2.4vw, 32px);
	margin-top: 10px;
}

.nm-404 p {
	color: var(--nm-muted);
	margin-inline: auto;
	max-width: 520px;
}

/* ---------- 合规长文页 ---------- */
.nm-legal h2 {
	margin-top: 1.9em;
}

.nm-legal__updated {
	color: var(--nm-muted);
	font-size: 12px;
	margin-bottom: 24px;
}

/* ---------- 联系 / 关于 ---------- */
.nm-contact {
	display: grid;
	gap: 26px;
	grid-template-columns: minmax(0, 1fr) 320px;
}

.nm-contact__card {
	background: rgba(13, 20, 40, 0.62);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius);
	padding: 24px;
}

.nm-contact__info {
	display: grid;
	gap: 12px;
}

.nm-contact__info div {
	background: rgba(17, 27, 50, 0.7);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius-sm);
	padding: 13px 15px;
}

.nm-contact__info strong {
	color: var(--nm-text);
	display: block;
	font-size: 12px;
	margin-bottom: 2px;
}

.nm-contact__info span {
	color: var(--nm-muted);
	font-size: 12px;
}

@media (max-width: 900px) {
	.nm-contact {
		grid-template-columns: 1fr;
	}
}

/* ---------- 对比页占位 ---------- */
.nm-compare-lock {
	background:
		radial-gradient(600px 300px at 50% 0%, rgba(168, 85, 247, 0.16), transparent 60%),
		rgba(13, 20, 40, 0.7);
	border: 1px solid rgba(168, 85, 247, 0.3);
	border-radius: var(--nm-radius-lg);
	padding: clamp(30px, 5vw, 60px);
	text-align: center;
}

.nm-compare-lock h1 {
	font-size: clamp(24px, 2.8vw, 36px);
}

.nm-compare-lock p {
	color: var(--nm-muted);
	margin-inline: auto;
	max-width: 620px;
}
