/* SE Site Chrome — 站点顶部导航与页脚（与主题解耦，浅色极简线框） */

.se-topbar {
	position: sticky;
	top: 0;
	z-index: 999;
	background: #fff;
	border-bottom: 1px solid #e2e8f0;
}

.se-topbar__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
	height: 64px;
	display: flex;
	align-items: center;
	gap: 28px;
}

.se-brand {
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #1a202c;
	text-decoration: none;
	white-space: nowrap;
}

.se-brand span {
	color: #3182ce;
	margin-left: 3px;
}

/* ---------- nav ---------- */
.se-nav {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 1;
}

.se-nav__item {
	position: relative;
}

.se-nav__btn,
.se-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 64px;
	padding: 0 14px;
	border: 0;
	background: none;
	font-size: 15px;
	font-weight: 500;
	color: #2d3748;
	text-decoration: none;
	cursor: pointer;
	font-family: inherit;
}

.se-nav__btn:hover,
.se-nav__link:hover {
	color: #3182ce;
}

.se-nav__btn:focus-visible,
.se-nav__link:focus-visible {
	outline: 2px solid #3182ce;
	outline-offset: -4px;
}

.se-caret {
	font-size: 11px;
	opacity: 0.6;
}

.se-sub {
	display: none;
	position: absolute;
	top: 60px;
	left: 0;
	min-width: 240px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(26, 32, 44, 0.09);
	padding: 8px;
	flex-direction: column;
}

.se-sub--wide {
	min-width: 300px;
	display: none;
	grid-template-columns: 1fr 1fr;
	gap: 2px;
}

.se-nav__item.is-open > .se-sub {
	display: flex;
}

.se-sub--wide.is-open,
.se-nav__item.is-open > .se-sub--wide {
	display: grid;
}

@media (hover: hover) {
	.se-nav__item:hover > .se-sub {
		display: flex;
	}
	.se-nav__item:hover > .se-sub--wide {
		display: grid;
	}
}

.se-sub a {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 6px;
	font-size: 14px;
	color: #2d3748;
	text-decoration: none;
	white-space: nowrap;
}

.se-sub a:hover {
	background: #f2f6fa;
	color: #3182ce;
}

.se-sub a em {
	font-style: normal;
	font-size: 12px;
	color: #8b9aab;
}

/* ---------- search ---------- */
.se-search {
	margin-left: auto;
}

.se-search input {
	width: 200px;
	padding: 8px 12px;
	font-size: 14px;
	font-family: inherit;
	border: 1px solid #cfd8e3;
	border-radius: 999px;
	background: #f7fafc;
	color: #1a202c;
}

.se-search input:focus {
	outline: none;
	border-color: #3182ce;
	background: #fff;
}

.se-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- footer ---------- */
.se-foot {
	margin-top: 72px;
	border-top: 1px solid #e2e8f0;
	background: #fbfcfd;
}

.se-foot__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 48px 24px 32px;
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 32px;
}

.se-foot__col h3 {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #5a6b7d;
	margin: 0 0 14px;
}

.se-foot__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.se-foot__col li {
	margin-bottom: 9px;
}

.se-foot__col a {
	font-size: 14px;
	color: #2d3748;
	text-decoration: none;
}

.se-foot__col a:hover {
	color: #3182ce;
	text-decoration: underline;
}

.se-foot__brand {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 10px;
	color: #1a202c;
}

.se-foot__brand span {
	color: #3182ce;
	margin-left: 3px;
}

.se-foot__col--about p {
	font-size: 14px;
	color: #5a6b7d;
	margin: 0;
	max-width: 340px;
	line-height: 1.65;
}

.se-foot__bottom {
	max-width: 1180px;
	margin: 0 auto;
	padding: 16px 24px 28px;
	border-top: 1px solid #e8edf3;
}

.se-foot__bottom p {
	margin: 0;
	font-size: 13px;
	color: #8b9aab;
}

/* ---------- 难度徽标（文章页） ---------- */
.se-levelbadge {
	margin: 0 0 18px;
}

.se-levelbadge a {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid;
}

.se-levelbadge--beginner a {
	color: #2f855a;
	border-color: #b7e0c6;
	background: #f0faf4;
}

.se-levelbadge--intermediate a {
	color: #2b6cb0;
	border-color: #c3ddf5;
	background: #f1f7fd;
}

.se-levelbadge--advanced a {
	color: #975a16;
	border-color: #f0d9a8;
	background: #fdf8ee;
}

/* ---------- 首页等级卡片 ---------- */
.se-levels {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 18px;
}

.se-levelcard {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.se-levelcard:hover {
	border-color: #c7d3e0;
	transform: translateY(-2px);
}

.se-levelcard__tag {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #3182ce;
}

.se-levelcard__name {
	font-size: 19px;
	font-weight: 600;
}

.se-levelcard__desc {
	font-size: 14px;
	color: #5a6b7d;
}

.se-levelcard__count {
	font-size: 13px;
	color: #8b9aab;
	margin-top: 4px;
}

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
	.se-foot__inner {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 720px) {
	.se-topbar__inner {
		height: auto;
		flex-wrap: wrap;
		padding: 12px 16px;
		gap: 10px;
	}

	.se-nav {
		order: 3;
		width: 100%;
		flex-wrap: wrap;
		gap: 0;
	}

	.se-nav__btn,
	.se-nav__link {
		height: 42px;
		padding: 0 10px;
		font-size: 14px;
	}

	.se-sub {
		position: static;
		box-shadow: none;
		margin: 0 0 8px;
	}

	.se-sub--wide {
		grid-template-columns: 1fr;
	}

	.se-search {
		margin-left: 0;
		flex: 1;
	}

	.se-search input {
		width: 100%;
	}

	.se-foot__inner {
		grid-template-columns: 1fr;
		padding: 32px 16px 24px;
	}
}
