/* ============================================================
 *  Saber Field Manual · Main Styles
 *  品牌：黑底 + Light/Dark 阵营色 + neon glow
 *  引用 design-tokens.md 的 --ls-* CSS 变量
 * ============================================================ */

:root {
	--fm-bg: #080a0d;
	--fm-bg-elevated: #0f1318;
	--fm-bg-card: #14191f;
	--fm-border: #1f242c;
	--fm-border-strong: #2a323d;
	--fm-text: #f5f7f8;
	--fm-text-2: #b0b8c0;
	--fm-text-3: #707a85;
	--fm-accent: #00E5FF;       /* Light primary */
	--fm-accent-glow: rgba(0, 229, 255, 0.4);
	--fm-warn: #FF1744;         /* Dark primary */
	--fm-warn-glow: rgba(255, 23, 68, 0.4);
	--fm-gold: #FFD700;
	--fm-radius: 12px;
	--fm-radius-lg: 20px;
	--fm-shadow-glow: 0 0 32px var(--fm-accent-glow);
}

/* === base === */
.bjs-fm {
	background: var(--fm-bg);
	color: var(--fm-text);
	font-family: 'Inter', -apple-system, sans-serif;
	line-height: 1.6;
	min-height: 60vh;
}

.bjs-fm a { color: var(--fm-accent); text-decoration: none; transition: color 0.2s; }
.bjs-fm a:hover { color: var(--fm-text); }

.bjs-fm .screen-reader-text { position: absolute; left: -9999px; }
.bjs-fm .fm-h1 {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--fm-text);
	margin: 0 0 0.5em;
}
.bjs-fm .fm-h2 {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: clamp(1.5rem, 3vw, 2.2rem);
	font-weight: 700;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	color: var(--fm-text);
	margin: 0 0 1em;
}
.bjs-fm .fm-section-index {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--fm-accent);
	margin: 0 0 0.5em;
}

/* === hero === */
.fm-hero {
	padding: 6rem 1.5rem 4rem;
	background:
		radial-gradient(ellipse at 50% 0%, rgba(0, 229, 255, 0.08) 0%, transparent 60%),
		linear-gradient(180deg, var(--fm-bg) 0%, var(--fm-bg-elevated) 100%);
	border-bottom: 1px solid var(--fm-border);
}
.fm-hero-inner {
	max-width: 760px;
	margin: 0 auto;
	text-align: center;
}
.fm-hero .fm-subtitle {
	font-size: 1.25rem;
	color: var(--fm-text-2);
	margin: 0 0 2rem;
}
.fm-hero-trust {
	margin-top: 1.5rem;
	font-size: 0.9rem;
	color: var(--fm-text-3);
}
.fm-hero-trust strong { color: var(--fm-accent); }

/* search box */
.fm-search {
	position: relative;
	display: flex;
	align-items: center;
	max-width: 600px;
	margin: 0 auto;
	background: var(--fm-bg-card);
	border: 1px solid var(--fm-border-strong);
	border-radius: var(--fm-radius-lg);
	padding: 0.75rem 1rem;
	transition: all 0.2s;
}
.fm-search:focus-within {
	border-color: var(--fm-accent);
	box-shadow: 0 0 0 4px var(--fm-accent-glow);
}
.fm-search .ph-magnifying-glass {
	font-size: 1.5rem;
	color: var(--fm-text-3);
	margin-right: 0.75rem;
}
.fm-search input {
	flex: 1;
	background: transparent;
	border: 0;
	outline: none;
	color: var(--fm-text);
	font-size: 1.1rem;
	font-family: inherit;
	padding: 0.25rem 0;
}
.fm-search input::placeholder { color: var(--fm-text-3); }
.fm-search-clear {
	background: transparent;
	border: 0;
	color: var(--fm-text-3);
	font-size: 1.2rem;
	cursor: pointer;
	padding: 0.25rem;
	display: flex;
	align-items: center;
}
.fm-search-clear:hover { color: var(--fm-text); }

.fm-quick-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.5rem;
}
.fm-chip {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	font-size: 0.875rem;
	background: rgba(0, 229, 255, 0.05);
	border: 1px solid rgba(0, 229, 255, 0.2);
	border-radius: 999px;
	color: var(--fm-accent);
	transition: all 0.2s;
}
.fm-chip:hover {
	background: rgba(0, 229, 255, 0.15);
	color: var(--fm-text);
}

/* search results dropdown */
.fm-search-results {
	max-width: 600px;
	margin: 1rem auto 0;
	background: var(--fm-bg-card);
	border: 1px solid var(--fm-border-strong);
	border-radius: var(--fm-radius);
	overflow: hidden;
}
.fm-search-results[hidden] { display: none; }
.fm-search-result {
	display: block;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--fm-border);
	color: var(--fm-text);
	transition: background 0.15s;
}
.fm-search-result:last-child { border-bottom: 0; }
.fm-search-result:hover, .fm-search-result:focus {
	background: rgba(0, 229, 255, 0.05);
	color: var(--fm-text);
}
.fm-search-result-q {
	font-weight: 600;
	color: var(--fm-text);
	margin: 0 0 0.25rem;
}
.fm-search-result-a {
	font-size: 0.875rem;
	color: var(--fm-text-2);
	margin: 0;
	line-height: 1.4;
}
.fm-search-result-cat {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--fm-accent);
	margin-bottom: 0.25rem;
}
.fm-search-empty {
	padding: 1.5rem;
	text-align: center;
	color: var(--fm-text-3);
}
.fm-search-empty strong { color: var(--fm-text); }

/* === sections === */
.fm-categories, .fm-popular, .fm-all, .fm-cta {
	padding: 4rem 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
}

/* category grid */
.fm-cat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1rem;
}
.fm-cat-card {
	position: relative;
	display: block;
	padding: 1.75rem 1.5rem;
	background: var(--fm-bg-card);
	border: 1px solid var(--fm-border);
	border-radius: var(--fm-radius);
	color: var(--fm-text);
	transition: all 0.2s;
	overflow: hidden;
}
.fm-cat-card::before {
	content: '';
	position: absolute;
	top: 0; left: 0;
	width: 100%;
	height: 2px;
	background: var(--fm-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s;
}
.fm-cat-card:hover {
	border-color: var(--fm-accent);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	color: var(--fm-text);
}
.fm-cat-card:hover::before { transform: scaleX(1); }
.fm-cat-card .ph {
	font-size: 2.25rem;
	color: var(--fm-accent);
	margin-bottom: 0.75rem;
	display: block;
}
.fm-cat-name {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.5rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0 0 0.5rem;
	color: var(--fm-text);
}
.fm-cat-desc {
	font-size: 0.9rem;
	color: var(--fm-text-2);
	margin: 0 0 0.75rem;
}
.fm-cat-count {
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	color: var(--fm-text-3);
	margin: 0;
}
.fm-cat-arrow {
	position: absolute;
	bottom: 1.5rem;
	right: 1.5rem;
	font-size: 1.25rem;
	color: var(--fm-accent);
	opacity: 0;
	transform: translateX(-4px);
	transition: all 0.2s;
}
.fm-cat-card:hover .fm-cat-arrow {
	opacity: 1;
	transform: translateX(0);
}

/* popular list */
.fm-popular-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1rem;
}
.fm-popular-item {
	display: block;
	padding: 1.5rem;
	background: var(--fm-bg-card);
	border: 1px solid var(--fm-border);
	border-radius: var(--fm-radius);
	color: var(--fm-text);
	transition: all 0.2s;
}
.fm-popular-item:hover {
	border-color: var(--fm-accent);
	color: var(--fm-text);
}
.fm-popular-q {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0 0 0.5rem;
	color: var(--fm-text);
}
.fm-popular-a {
	font-size: 0.9rem;
	color: var(--fm-text-2);
	margin: 0 0 1rem;
	line-height: 1.5;
}
.fm-popular-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--fm-accent);
}

/* all articles by category */
.fm-all {
	border-top: 1px solid var(--fm-border);
}
.fm-all .fm-count {
	display: inline-block;
	font-size: 0.5em;
	color: var(--fm-text-3);
	font-weight: 400;
	margin-left: 0.5rem;
}
.fm-cat-section {
	margin-bottom: 3rem;
}
.fm-cat-section-head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--fm-border);
}
.fm-cat-section-head .ph {
	font-size: 1.5rem;
	color: var(--fm-accent);
}
.fm-cat-section-name {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.5rem;
	font-weight: 700;
	text-transform: uppercase;
	margin: 0;
	flex: 1;
}
.fm-cat-section-link {
	font-size: 0.875rem;
	color: var(--fm-accent);
}
.fm-article-list {
	list-style: none;
	padding: 0;
	margin: 0;
	columns: 2;
	column-gap: 2rem;
}
@media (max-width: 768px) {
	.fm-article-list { columns: 1; }
}
.fm-article-list li {
	break-inside: avoid;
	margin-bottom: 0.5rem;
}
.fm-article-list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
	color: var(--fm-text-2);
	font-size: 0.95rem;
	transition: all 0.15s;
}
.fm-article-list a:hover {
	background: rgba(0, 229, 255, 0.05);
	color: var(--fm-text);
}
.fm-article-list a .ph {
	opacity: 0;
	transition: opacity 0.15s;
}
.fm-article-list a:hover .ph { opacity: 1; }

/* === cta === */
.fm-cta {
	background: var(--fm-bg-elevated);
	border-top: 1px solid var(--fm-border);
	border-radius: var(--fm-radius-lg);
	margin: 2rem auto 4rem;
	padding: 3rem 1.5rem;
	text-align: center;
}
.fm-cta-inner .ph {
	font-size: 3rem;
	color: var(--fm-accent);
	margin-bottom: 1rem;
}
.fm-cta-inner p { color: var(--fm-text-2); margin: 0 0 1.5rem; }
.fm-cta-actions {
	display: flex;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}
.fm-cta-meta {
	font-size: 0.875rem;
	color: var(--fm-text-3);
}
.fm-cta-form {
	max-width: 500px;
	margin: 2rem auto 0;
	padding-top: 2rem;
	border-top: 1px solid var(--fm-border);
}

/* === buttons === */
.fm-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	font-size: 0.95rem;
	font-weight: 600;
	border: 1px solid var(--fm-border-strong);
	border-radius: var(--fm-radius);
	background: var(--fm-bg-card);
	color: var(--fm-text);
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s;
}
.fm-btn:hover {
	background: var(--fm-bg-elevated);
	color: var(--fm-text);
	border-color: var(--fm-accent);
}
.fm-btn.fm-btn-primary {
	background: var(--fm-accent);
	color: var(--fm-bg);
	border-color: var(--fm-accent);
}
.fm-btn.fm-btn-primary:hover {
	background: var(--fm-text);
	color: var(--fm-bg);
	border-color: var(--fm-text);
}
.fm-btn.fm-btn-ghost {
	background: transparent;
	color: var(--fm-text-2);
}
.fm-btn.fm-btn-ghost:hover {
	color: var(--fm-accent);
}

/* === single article === */
.bjs-fm-single {
	max-width: 820px;
	margin: 0 auto;
	padding: 2rem 1.5rem 4rem;
}
.fm-breadcrumb {
	margin-bottom: 1.5rem;
}
.fm-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 0.875rem;
	color: var(--fm-text-3);
}
.fm-breadcrumb li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.fm-breadcrumb li:not(:last-child)::after {
	content: '/';
	color: var(--fm-text-3);
}
.fm-breadcrumb a { color: var(--fm-text-2); }
.fm-breadcrumb a:hover { color: var(--fm-accent); }
.fm-breadcrumb [aria-current] { color: var(--fm-text); }

.fm-article-head {
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--fm-border);
}
.fm-article-cat {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--fm-accent);
	margin: 0 0 0.75rem;
}
.fm-article-head .fm-h1 {
	font-size: clamp(2rem, 4vw, 3rem);
	margin: 0 0 0.5rem;
}
.fm-article-meta {
	font-size: 0.875rem;
	color: var(--fm-text-3);
	margin: 0;
}
.fm-article-meta time { color: var(--fm-text-2); }

.fm-tldr {
	background: linear-gradient(135deg, rgba(0, 229, 255, 0.08) 0%, rgba(0, 229, 255, 0.02) 100%);
	border: 1px solid rgba(0, 229, 255, 0.3);
	border-left: 3px solid var(--fm-accent);
	border-radius: var(--fm-radius);
	padding: 1.25rem 1.5rem;
	margin: 0 0 2rem;
}
.fm-tldr-label {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--fm-accent);
	margin: 0 0 0.5rem;
}
.fm-tldr-body p { margin: 0; color: var(--fm-text); }

.fm-answer {
	color: var(--fm-text);
	font-size: 1.0625rem;
	line-height: 1.7;
}
.fm-answer h2 {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.5rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: var(--fm-text);
	margin: 2rem 0 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--fm-border);
}
.fm-answer h2:first-child { margin-top: 0; padding-top: 0; border: 0; }
.fm-answer h3 {
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--fm-text);
	margin: 1.5rem 0 0.5rem;
}
.fm-answer p { margin: 0 0 1rem; color: var(--fm-text); }
.fm-answer ul, .fm-answer ol { margin: 0 0 1rem; padding-left: 1.5rem; }
.fm-answer li { margin-bottom: 0.5rem; color: var(--fm-text); }
.fm-answer strong { color: var(--fm-text); }
.fm-answer a { color: var(--fm-accent); text-decoration: underline; }
.fm-answer table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5rem 0;
	font-size: 0.95rem;
}
.fm-answer th, .fm-answer td {
	padding: 0.75rem 1rem;
	border: 1px solid var(--fm-border);
	text-align: left;
}
.fm-answer th {
	background: var(--fm-bg-elevated);
	font-weight: 700;
	color: var(--fm-text);
}

/* helpful */
.fm-helpful {
	margin: 3rem 0;
	padding: 1.5rem;
	background: var(--fm-bg-card);
	border: 1px solid var(--fm-border);
	border-radius: var(--fm-radius);
	text-align: center;
}
.fm-helpful-q {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--fm-text);
	margin: 0 0 1rem;
}
.fm-helpful-actions {
	display: flex;
	justify-content: center;
	gap: 0.75rem;
}
.fm-btn-helpful {
	font-size: 0.95rem;
}
.fm-helpful-count {
	display: inline-block;
	padding: 0.1rem 0.5rem;
	background: var(--fm-bg);
	border-radius: 999px;
	font-size: 0.8rem;
	color: var(--fm-text-2);
	min-width: 1.5rem;
}
.fm-helpful-thanks {
	color: var(--fm-accent);
	margin: 1rem 0 0;
	font-weight: 500;
}

/* related */
.fm-related {
	margin: 3rem 0;
	padding: 2rem;
	background: var(--fm-bg-elevated);
	border: 1px solid var(--fm-border);
	border-radius: var(--fm-radius);
}
.fm-related-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.fm-related-list li {
	border-bottom: 1px solid var(--fm-border);
}
.fm-related-list li:last-child { border-bottom: 0; }
.fm-related-list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 0;
	color: var(--fm-text);
	font-weight: 500;
}
.fm-related-list a:hover { color: var(--fm-accent); }
.fm-related-list a .ph {
	color: var(--fm-text-3);
	transition: transform 0.2s;
}
.fm-related-list a:hover .ph {
	transform: translateX(4px);
	color: var(--fm-accent);
}

/* context cta */
.fm-context-cta {
	margin: 3rem 0;
	padding: 1.5rem;
	background: rgba(0, 229, 255, 0.04);
	border: 1px solid var(--fm-border);
	border-radius: var(--fm-radius);
}
.fm-context-cta-label {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--fm-text-3);
	margin: 0 0 0.75rem;
}
.fm-context-cta-actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}
.fm-cta-mini {
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid var(--fm-border);
	text-align: center;
	color: var(--fm-text-2);
}

/* === archive === */
.bjs-fm-archive {
	max-width: 900px;
	margin: 0 auto;
	padding: 2rem 1.5rem 4rem;
}
.fm-archive-head {
	text-align: center;
	margin-bottom: 3rem;
}
.fm-archive-icon {
	font-size: 3.5rem;
	color: var(--fm-accent);
	margin-bottom: 1rem;
	display: block;
}
.fm-archive-desc {
	color: var(--fm-text-2);
	font-size: 1.1rem;
	margin: 0 0 1rem;
}
.fm-archive-note a {
	font-size: 0.875rem;
	color: var(--fm-text-2);
}
.fm-archive-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.fm-archive-item {
	margin-bottom: 1rem;
}
.fm-archive-item a {
	display: block;
	padding: 1.25rem 1.5rem;
	background: var(--fm-bg-card);
	border: 1px solid var(--fm-border);
	border-radius: var(--fm-radius);
	color: var(--fm-text);
	transition: all 0.2s;
}
.fm-archive-item a:hover {
	border-color: var(--fm-accent);
	color: var(--fm-text);
	transform: translateY(-2px);
}
.fm-archive-q {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0 0 0.5rem;
	color: var(--fm-text);
}
.fm-archive-a {
	font-size: 0.9rem;
	color: var(--fm-text-2);
	margin: 0 0 0.75rem;
}
.fm-archive-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.875rem;
	color: var(--fm-accent);
	font-weight: 600;
}

/* === responsive === */
@media (max-width: 768px) {
	.fm-hero { padding: 4rem 1rem 3rem; }
	.fm-categories, .fm-popular, .fm-all, .fm-cta { padding: 3rem 1rem; }
	.fm-cat-grid, .fm-popular-list { grid-template-columns: 1fr; }
	.bjs-fm-single { padding: 1.5rem 1rem 3rem; }
	.fm-cta-actions { flex-direction: column; align-items: stretch; }
	.fm-btn { justify-content: center; }
	.fm-article-head .fm-h1 { font-size: 1.75rem; }
	/* 多列表格超出屏宽时横向滚动，不裁列 */
	.fm-answer table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
