/* ==========================================================================
   clash.top 主题样式
   设计令牌见开发文档第 2 节。颜色只用这里定义的变量。
   ========================================================================== */

/* ---------- 1. 设计令牌（浅色为默认） ---------- */
:root {
	--bg: #ffffff;
	--bg2: #f6f8fa;
	--line: #d0d7de;
	--line2: #eaeef2;
	--fg: #1f2328;
	--muted: #57606a;
	--dash: #8c959f;
	--tint: #e8eef5;
	--primary: #053c6d;
	--hover: #0a5aa3;
	--navy: #053c6d;
	--amberText: #b45309;
	/* 强调色不随主题变化；橙底上的文字一律用 --on-accent（禁止白字）。 */
	--accent: #f59e0b;
	--on-accent: #053c6d;
	/* 页头页脚（海军蓝底）上的文字 */
	--nav-fg: #dbe5ef;
	--foot-fg: #c9d6e3;
	--foot-muted: #9fb3c8;

	--font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

	--wrap: 1200px;
	--gutter: 24px;
	--header-h: 64px;
	--shadow-pop: 0 16px 32px rgba(5, 60, 109, 0.16);

	color-scheme: light;
}

[data-theme="dark"] {
	--bg: #0d1117;
	--bg2: #161b22;
	--line: #30363d;
	--line2: #21262d;
	--fg: #e6edf3;
	--muted: #9198a1;
	--dash: #6e7681;
	--tint: #1c2b3c;
	--primary: #79b8ff;
	--hover: #a5d0ff;
	--navy: #0b2a4a;
	--amberText: #f59e0b;
	--shadow-pop: 0 16px 32px rgba(0, 0, 0, 0.45);

	color-scheme: dark;
}

/* ---------- 2. 基础 ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
}

a {
	color: var(--primary);
	text-decoration: none;
}

a:hover {
	color: var(--hover);
	text-decoration: underline;
}

img,
svg {
	vertical-align: middle;
}

img {
	max-width: 100%;
	height: auto;
}

button {
	font: inherit;
	color: inherit;
}

code,
kbd,
pre,
samp {
	font-family: var(--font-mono);
}

ul,
ol {
	margin: 0;
	padding: 0;
}

/* 键盘操作时显示焦点框（开发文档第 10 节） */
:focus {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
	border-radius: 4px;
}

/* 海军蓝底上用橙色焦点框（橙色对白底只有 2.15:1，不够 3:1；对海军蓝 5.22:1） */
.ct-header__bar :focus-visible,
.ct-footer :focus-visible,
.ct-cta :focus-visible,
.ct-totop:focus-visible,
.ct-skip:focus-visible {
	outline-color: var(--accent);
}

.ct-wrap {
	max-width: var(--wrap);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* 跳到正文 */
.ct-skip {
	position: absolute;
	left: 12px;
	top: -100px;
	z-index: 100;
	padding: 10px 16px;
	border-radius: 8px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 700;
}

.ct-skip:focus {
	top: 12px;
	color: var(--on-accent);
	text-decoration: none;
}

/* ---------- 3. 小组件：标签、名次、平台图标 ---------- */
.ct-tag {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

.ct-tag--rec {
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 700;
}

.ct-tag--stopped,
.ct-tag--renamed {
	background: var(--line2);
	color: var(--muted);
}

.ct-rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: var(--tint);
	color: var(--primary);
	font-size: 14px;
	font-weight: 800;
}

.ct-rank--top {
	background: var(--accent);
	color: var(--on-accent);
}

.ct-picon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	background: var(--tint);
	color: var(--primary);
}

.ct-dot {
	color: var(--accent);
}

/* ---------- 4. 页头 ---------- */
.ct-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--navy);
	box-shadow: 0 2px 10px rgba(5, 60, 109, 0.18);
}

.admin-bar .ct-header {
	top: 32px;
}

.ct-header__bar {
	display: flex;
	align-items: stretch;
	gap: 12px;
	height: var(--header-h);
}

.ct-brand {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	min-width: 0;
}

.ct-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	color: #ffffff;
}

.ct-logo:hover {
	color: #ffffff;
	text-decoration: none;
}

.ct-logo__text {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.5px;
	color: #ffffff;
	line-height: 1;
}

.ct-tagline {
	margin-left: 14px;
	padding-left: 14px;
	border-left: 1px solid rgba(255, 255, 255, 0.25);
	font-size: 13px;
	color: var(--foot-fg);
	white-space: nowrap;
}

.ct-nav {
	display: flex;
	align-items: stretch;
	gap: 2px;
	margin-left: auto;
}

.ct-nav__item {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 14px;
	border: 0;
	border-top: 3px solid transparent;
	border-bottom: 3px solid transparent;
	background: transparent;
	color: var(--nav-fg);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.ct-nav__item:hover {
	color: #ffffff;
	text-decoration: none;
}

.ct-nav__item.is-current {
	color: #ffffff;
	border-bottom-color: var(--accent);
}

.ct-nav__mega[aria-expanded="true"] {
	color: #ffffff;
	border-bottom-color: var(--accent);
	background: rgba(255, 255, 255, 0.1);
}

.ct-nav__mega .ct-icon {
	transition: transform 0.15s ease;
}

.ct-nav__mega[aria-expanded="true"] .ct-icon {
	transform: rotate(180deg);
}

.ct-header__tools {
	display: flex;
	align-items: center;
	gap: 16px;
}

.ct-header__sep {
	width: 1px;
	height: 28px;
	background: rgba(255, 255, 255, 0.3);
}

.ct-iconbtn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 8px;
	background: transparent;
	color: #ffffff;
	cursor: pointer;
}

.ct-iconbtn:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* 深浅色按钮：浅色时显示月亮，深色时显示太阳 */
.ct-theme-toggle .ct-icon-sun,
[data-theme="dark"] .ct-theme-toggle .ct-icon-moon {
	display: none;
}

[data-theme="dark"] .ct-theme-toggle .ct-icon-sun {
	display: block;
}

.ct-menu-toggle {
	display: none;
}

.ct-menu-toggle .ct-icon-close,
.ct-menu-toggle[aria-expanded="true"] .ct-icon-menu {
	display: none;
}

.ct-menu-toggle[aria-expanded="true"] .ct-icon-close {
	display: block;
}

/* ---------- 5. 客户端下载大菜单 ---------- */
.ct-mega {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
	box-shadow: var(--shadow-pop);
}

.ct-mega[hidden] {
	display: none;
}

.ct-mega__inner {
	display: flex;
	gap: 24px;
	padding-top: 20px;
	padding-bottom: 24px;
}

.ct-mega__tabs {
	display: flex;
	flex: 0 0 190px;
	flex-direction: column;
	gap: 2px;
}

.ct-mega__tab {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--fg);
	font-size: 14px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.ct-mega__tab:hover,
.ct-mega__tab[aria-selected="true"] {
	background: var(--tint);
	color: var(--primary);
}

.ct-mega__tabname {
	flex-grow: 1;
}

.ct-mega__count {
	font-size: 12px;
	font-weight: 400;
	color: var(--muted);
}

.ct-mega__main {
	flex-grow: 1;
	min-width: 0;
	padding-left: 24px;
	border-left: 1px solid var(--line2);
}

.ct-mega__head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 12px;
}

.ct-mega__title {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	color: var(--primary);
}

.ct-mega__note {
	font-size: 12px;
	color: var(--muted);
}

.ct-mega__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	list-style: none;
}

.ct-mega__client {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 9px 12px;
	border: 1px solid var(--line2);
	border-radius: 8px;
	background: var(--bg2);
	color: var(--fg);
}

a.ct-mega__client:hover {
	border-color: var(--primary);
	color: var(--fg);
	text-decoration: none;
}

.ct-mega__cname {
	flex-grow: 1;
	font-size: 14px;
	font-weight: 600;
}

.ct-mega__top {
	display: flex;
	flex: 0 0 240px;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	border: 1px solid var(--line2);
	border-radius: 12px;
	background: var(--bg2);
	align-self: flex-start;
}

.ct-mega__toptitle {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 800;
	color: var(--primary);
}

.ct-toplist {
	display: flex;
	flex-direction: column;
	gap: 8px;
	list-style: none;
}

.ct-toplist__item {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	font-size: 14px;
	color: var(--fg);
}

a.ct-toplist__item:hover {
	color: var(--primary);
	text-decoration: none;
}

.ct-mega__more {
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
}

/* ---------- 6. 手机端抽屉菜单 ---------- */
.ct-drawer {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: calc(100vh - var(--header-h));
	max-height: calc(100dvh - var(--header-h));
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 12px 16px 16px;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
	box-shadow: var(--shadow-pop);
}

.ct-drawer[hidden] {
	display: none;
}

.ct-drawer__quick {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.ct-drawer__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	border-radius: 8px;
	background: var(--bg2);
	color: var(--fg);
	font-size: 14px;
}

.ct-drawer__btn:hover {
	color: var(--fg);
	text-decoration: none;
}

.ct-drawer__btn.is-current {
	background: var(--tint);
	color: var(--primary);
	font-weight: 600;
}

.ct-drawer__btn--accent,
.ct-drawer__btn--accent:hover {
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 700;
}

.ct-drawer__label {
	margin: 4px 0 0;
	font-size: 12px;
	font-weight: 700;
	color: var(--muted);
}

.ct-drawer__list {
	border: 1px solid var(--line);
	border-radius: 10px;
}

.ct-drawer__group + .ct-drawer__group {
	border-top: 1px solid var(--line2);
}

.ct-drawer__group summary {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 14px;
	font-size: 15px;
	font-weight: 600;
	color: var(--fg);
	cursor: pointer;
	list-style: none;
}

.ct-drawer__group summary::-webkit-details-marker {
	display: none;
}

.ct-drawer__pname {
	flex-grow: 1;
}

.ct-drawer__count {
	font-size: 12px;
	font-weight: 400;
	color: var(--muted);
}

.ct-drawer__sign {
	width: 16px;
	font-size: 18px;
	color: var(--primary);
	text-align: center;
}

.ct-drawer__sign::after {
	content: "+";
}

.ct-drawer__group[open] .ct-drawer__sign::after {
	content: "\2212";
}

.ct-drawer__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	padding: 0 12px 12px;
	list-style: none;
}

.ct-drawer__client {
	display: flex;
	align-items: center;
	gap: 4px;
	min-height: 44px;
	padding: 6px 10px;
	border-radius: 6px;
	background: var(--bg2);
	color: var(--fg);
	font-size: 13px;
}

.ct-drawer__client > span:first-child {
	flex-grow: 1;
}

a.ct-drawer__client:hover {
	color: var(--primary);
	text-decoration: none;
}

/* ---------- 7. 主体（阶段 1 只放通用排版，页面模板在阶段 2） ---------- */
.ct-main {
	display: block;
	padding-top: 40px;
	padding-bottom: 72px;
	min-height: 50vh;
}

.ct-main:focus {
	outline: none;
}

.ct-h1 {
	margin: 0 0 16px;
	font-size: 34px;
	line-height: 1.3;
	color: var(--primary);
}

.ct-prose {
	font-size: 17px;
	line-height: 1.85;
	overflow-wrap: break-word;
}

.ct-prose h2 {
	margin: 32px 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--line);
	font-size: 24px;
	line-height: 1.4;
	color: var(--primary);
}

.ct-prose h3 {
	margin: 24px 0 10px;
	font-size: 19px;
	line-height: 1.5;
	color: var(--fg);
}

.ct-prose p {
	margin: 0 0 14px;
}

.ct-prose ul,
.ct-prose ol {
	margin: 0 0 14px;
	padding-left: 1.5em;
}

.ct-prose pre {
	overflow-x: auto;
	padding: 14px 16px;
	border-radius: 8px;
	background: var(--bg2);
	font-size: 14px;
	line-height: 1.6;
}

.ct-postlist {
	list-style: none;
}

.ct-postlist li {
	padding: 10px 0;
	border-bottom: 1px solid var(--line2);
}

.ct-postlist time {
	margin-left: 8px;
	font-size: 13px;
	color: var(--muted);
}

/* ---------- 8. 页脚 ---------- */
.ct-footer {
	background: var(--navy);
	color: var(--foot-fg);
}

.ct-footer__inner {
	padding-top: 40px;
	padding-bottom: 28px;
}

.ct-footer__cols {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
	gap: 40px;
}

.ct-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ct-footer__brand p {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
}

.ct-footer__brand .ct-footer__logo {
	font-size: 20px;
	font-weight: 800;
	color: #ffffff;
	line-height: 1.3;
}

.ct-footer__brand .ct-footer__note {
	font-size: 12px;
	color: var(--foot-muted);
}

.ct-footer__title {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #ffffff;
}

.ct-footer__col ul {
	display: flex;
	flex-direction: column;
	gap: 0;
	list-style: none;
}

/* 页脚链接：点击区域至少 32px（WCAG 2.2 要求 24px；做满 44px 会让页脚很长，见日志） */
.ct-footer__col li > a,
.ct-footer__col li > span {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
}

.ct-footer__col a,
.ct-footer__col span {
	font-size: 14px;
	color: var(--foot-fg);
}

.ct-footer__col a:hover {
	color: #ffffff;
}

.ct-footer__col a.ct-footer__more {
	color: var(--accent);
	font-weight: 600;
}

.ct-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 0;
	margin-top: 28px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	font-size: 12px;
	color: var(--foot-muted);
}

.ct-footer__bottom span + span::before {
	content: "·";
	margin: 0 10px;
}

/* ---------- 9. 返回顶部 ---------- */
.ct-totop {
	position: fixed;
	right: 20px;
	bottom: 24px;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: var(--navy);
	color: #ffffff;
	box-shadow: 0 6px 16px rgba(5, 60, 109, 0.25);
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

[data-theme="dark"] .ct-totop {
	border: 1px solid var(--line);
}

.ct-totop:hover {
	color: #ffffff;
	text-decoration: none;
}

/* 有脚本时，滚动一屏后才显示 */
.js .ct-totop:not(.is-visible) {
	opacity: 0;
	visibility: hidden;
}

/* ---------- 10. 窄屏 ---------- */
@media (max-width: 1180px) {
	.ct-tagline {
		display: none;
	}
}

@media (max-width: 1023px) {
	:root {
		--gutter: 16px;
		--header-h: 56px;
	}

	.ct-header__bar {
		gap: 8px;
		padding-right: 8px;
	}

	.ct-logo {
		gap: 8px;
	}

	.ct-logo-mark {
		width: 28px;
		height: 28px;
	}

	.ct-logo__text {
		font-size: 19px;
	}

	.ct-nav,
	.ct-header__sep,
	.ct-mega {
		display: none !important;
	}

	.ct-header__tools {
		gap: 0;
		margin-left: auto;
	}

	.ct-iconbtn {
		width: 44px;
		height: 44px;
		border: 0;
	}

	.ct-menu-toggle {
		display: flex;
	}

	.ct-main {
		padding-top: 28px;
		padding-bottom: 48px;
	}

	.ct-h1 {
		font-size: 26px;
	}

	.ct-prose {
		font-size: 16px;
	}

	.ct-prose h2 {
		font-size: 21px;
	}

	.ct-footer__inner {
		padding-top: 28px;
		padding-bottom: 20px;
	}

	.ct-footer__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 16px;
	}

	.ct-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1024px) {
	.ct-drawer {
		display: none !important;
	}
}

@media (max-width: 782px) {
	.admin-bar .ct-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .ct-header {
		top: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   阶段 2：页面模板
   ========================================================================== */

/* ---------- 11. 通用：按钮、表格、标签、说明文字 ---------- */
.ct-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
}

.ct-btn:hover {
	text-decoration: none;
}

.ct-btn--sm {
	min-height: 44px;
	padding: 6px 12px;
	font-size: 13px;
}

.ct-btn--lg {
	padding: 14px 22px;
	font-size: 16px;
}

.ct-btn--accent,
.ct-btn--accent:hover {
	background: var(--accent);
	color: var(--on-accent);
}

.ct-btn--outline {
	border-color: var(--primary);
	color: var(--primary);
	background: transparent;
}

.ct-btn--outline:hover {
	background: var(--tint);
	color: var(--primary);
}

.ct-btn--navy,
.ct-btn--navy:hover {
	background: var(--navy);
	color: #ffffff;
}

[data-theme="dark"] .ct-btn--navy {
	border-color: var(--line);
}

.ct-muted {
	color: var(--muted);
}

.ct-note {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--muted);
}

.ct-lead {
	margin: 14px 0 0;
	max-width: 760px;
	font-size: 17px;
	line-height: 1.75;
	color: var(--muted);
}

.ct-updated {
	margin: 0 0 18px;
	font-size: 13px;
	color: var(--muted);
}

.ct-plats {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ct-plat {
	display: inline-flex;
	align-items: center;
	height: 22px;
	padding: 0 7px;
	border-radius: 5px;
	background: var(--tint);
	color: var(--primary);
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.ct-cell-name {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.ct-cell-name > a,
.ct-cell-name > span:first-child {
	font-size: 15px;
	font-weight: 700;
	color: var(--fg);
}

.ct-cell-name > a:hover {
	color: var(--primary);
}

.ct-tablewrap {
	position: relative; /* 让隐藏的表格标题也被裁在滚动框里，不撑宽页面 */
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: 12px;
	-webkit-overflow-scrolling: touch;
}

.ct-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	line-height: 1.5;
}

.ct-table th,
.ct-table td {
	padding: 10px 16px;
	text-align: left;
	vertical-align: middle;
	border-top: 1px solid var(--line2);
}

.ct-table thead th {
	border-top: 0;
	background: var(--bg2);
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.ct-table tbody th {
	font-weight: 400;
}

.ct-table tr[hidden] {
	display: none;
}

.ct-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 14px;
}

.ct-section-head > div {
	flex: 1 1 400px;
}

.ct-section-title {
	margin: 0;
	font-size: 26px;
	line-height: 1.35;
	color: var(--primary);
}

.ct-doc__main > .ct-section-title {
	margin: 40px 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--line);
	font-size: 24px;
}

.ct-more {
	font-size: 14px;
	font-weight: 600;
}

.ct-only-mobile {
	display: none;
}

/* ---------- 12. 两栏文档布局（开发文档 2.3：正文约 812px + 40px + 300px） ---------- */
.ct-doc {
	display: flex;
	align-items: flex-start;
	gap: 40px;
	padding-top: 24px;
	padding-bottom: 72px;
}

.ct-doc:focus {
	outline: none;
}

.ct-doc__main {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 812px;
}

.ct-doc__side {
	flex: 0 0 300px;
	width: 300px;
	align-self: stretch;
}

.ct-side__sticky {
	position: sticky;
	top: 80px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-height: calc(100vh - 100px);
	overflow-y: auto;
	scrollbar-width: thin;
}

.admin-bar .ct-side__sticky {
	top: 112px;
}

.ct-side__label {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: var(--muted);
}

.ct-side-box {
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: 12px;
}

.ct-crumbs {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--muted);
}

.ct-crumbs a {
	color: var(--muted);
}

.ct-crumbs a:hover {
	color: var(--primary);
}

.ct-crumbs__sep,
.ct-crumbs .separator {
	margin: 0 6px;
}

.ct-titlerow {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.ct-titlerow .ct-h1 {
	margin: 0;
}

.ct-picon--lg {
	width: 48px;
	height: 48px;
	border-radius: 12px;
}

.ct-doc .ct-h1 {
	margin-bottom: 8px;
}

/* ---------- 13. 目录 ---------- */
.ct-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ct-toc--side .ct-toc__list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	border-left: 2px solid var(--line2);
	font-size: 14px;
}

.ct-toc--side .ct-toc__list a {
	display: block;
	margin-left: -2px;
	padding: 6px 12px; /* 单行约 33px，满足 WCAG 2.2 的 24px；目录是密集链接列表，没有做满 44px（见日志） */
	border-left: 2px solid transparent;
	color: var(--muted);
	line-height: 1.5;
}

.ct-toc--side .ct-toc__l3 a {
	padding-left: 24px;
	font-size: 13px;
}

.ct-toc--side .ct-toc__list a:hover {
	color: var(--primary);
	text-decoration: none;
}

.ct-toc--side .ct-toc__list a.is-active {
	border-left-color: var(--primary);
	color: var(--primary);
	font-weight: 600;
}

.ct-toc--inline {
	display: none;
	margin: 16px 0 20px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg2);
}

.ct-toc--inline summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 48px;
	padding: 0 14px;
	font-size: 15px;
	font-weight: 700;
	color: var(--primary);
	cursor: pointer;
	list-style: none;
}

.ct-toc--inline summary::-webkit-details-marker {
	display: none;
}

.ct-toc__sign::after {
	content: "+";
	font-size: 18px;
}

.ct-toc--inline[open] .ct-toc__sign::after {
	content: "\2212";
}

.ct-toc--inline .ct-toc__list {
	padding: 0 14px 12px;
	font-size: 14px;
}

.ct-toc--inline .ct-toc__list a {
	display: block;
	padding: 8px 0;
	border-top: 1px solid var(--line2);
	color: var(--fg);
}

.ct-toc--inline .ct-toc__l3 a {
	padding-left: 14px;
	color: var(--muted);
}

/* ---------- 14. 正文里现有区块的统一样式 ---------- */
.ct-prose h4 {
	margin: 20px 0 8px;
	font-size: 17px;
	color: var(--fg);
}

.ct-prose img {
	border-radius: 8px;
}

.ct-prose figure {
	margin: 0 0 16px;
}

.ct-prose figcaption {
	margin-top: 6px;
	font-size: 13px;
	color: var(--muted);
	text-align: center;
}

.ct-prose .aligncenter {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.ct-prose code {
	padding: 1px 5px;
	border-radius: 4px;
	background: var(--bg2);
	font-size: 0.9em;
}

.ct-prose pre code {
	padding: 0;
	background: none;
}

.ct-prose blockquote {
	margin: 0 0 14px;
	padding: 10px 16px;
	border-left: 3px solid var(--line);
	background: var(--bg2);
	color: var(--muted);
}

/* 间隔块统一成固定小间距（原来的高度是给旧主题用的） */
.ct-prose .wp-block-spacer {
	height: 16px !important;
}

.ct-prose .wp-block-table,
.ct-prose .ninja_table_wrapper {
	position: relative;
	max-width: 100%;
	overflow-x: auto;
}

.ct-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.6;
}

.ct-prose th,
.ct-prose td {
	padding: 9px 12px;
	border: 1px solid var(--line);
	text-align: left;
}

.ct-prose thead th {
	background: var(--bg2);
	font-weight: 600;
}

.ct-prose tbody tr:nth-child(even) > td,
.ct-prose tbody tr:nth-child(even) > th {
	background: var(--bg2);
}

/* 现有下载 / 购买按钮（区块编辑器按钮，开发文档 4.2：主题统一样式） */
.ct-prose .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 16px;
}

.ct-prose .wp-block-buttons.is-content-justification-center {
	justify-content: center;
}

.ct-prose .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid var(--primary);
	border-radius: 8px;
	background: transparent;
	color: var(--primary);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.ct-prose .wp-block-button__link:hover {
	background: var(--tint);
	color: var(--primary);
	text-decoration: none;
}

.ct-prose .wp-block-button:first-child .wp-block-button__link,
.ct-prose a.wp-block-button__link[href*="dl.clash.top"] {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
}

/* 原标题上的背景色、居中等旧主题样式统一成本主题样式 */
.ct-prose h2.has-background,
.ct-prose h3.has-background {
	background: none !important;
	padding-left: 0;
	padding-right: 0;
}

.ct-prose h2.has-text-color,
.ct-prose h3.has-text-color {
	color: inherit !important;
}

.ct-prose h3.has-text-align-center {
	text-align: left;
}

/* ---------- 15. FAQ 折叠（Rank Math FAQ 块 + 主题自己的 FAQ） ---------- */
.ct-prose .rank-math-block,
.ct-faq {
	margin: 0 0 16px;
	border: 1px solid var(--line);
	border-radius: 10px;
	overflow: hidden;
}

.ct-prose .rank-math-list {
	margin: 0;
	padding: 0;
}

.ct-prose .rank-math-list-item + .rank-math-list-item,
.ct-faq__item + .ct-faq__item {
	border-top: 1px solid var(--line2);
}

.ct-prose .rank-math-question {
	margin: 0;
	padding: 12px 16px;
	border: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--fg);
}

.ct-prose .rank-math-answer,
.ct-faq__a {
	padding: 0 16px 14px;
	font-size: 15px;
	color: var(--fg);
}

.ct-prose .rank-math-answer p:last-child,
.ct-faq__a p:last-child {
	margin-bottom: 0;
}

.ct-prose .ct-faq-js .rank-math-question {
	padding: 0;
}

.ct-faq__btn,
.ct-faq__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	border: 0;
	background: transparent;
	color: var(--fg);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.5;
	text-align: left;
	cursor: pointer;
	list-style: none;
}

.ct-faq__item summary::-webkit-details-marker {
	display: none;
}

.ct-faq__btn::after,
.ct-faq__item summary::after {
	content: "+";
	flex-shrink: 0;
	width: 16px;
	font-size: 20px;
	font-weight: 400;
	color: var(--primary);
	text-align: center;
}

.ct-faq__btn[aria-expanded="true"]::after,
.ct-faq__item[open] summary::after {
	content: "\2212";
}

.ct-faq__btn:hover,
.ct-faq__item summary:hover {
	background: var(--bg2);
}

/* ---------- 16. 首页 ---------- */
.ct-hero {
	padding-top: 40px;
	padding-bottom: 8px;
}

.ct-eyebrow {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.5px;
	color: var(--amberText);
}

.ct-h1--home {
	margin: 0;
	font-size: 40px;
	line-height: 1.25;
}

.ct-detect {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 18px;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--tint);
}

.ct-detect[hidden] {
	display: none;
}

.ct-detect__icon {
	display: inline-flex;
	color: var(--primary);
}

.ct-detect__text {
	font-size: 15px;
}

.ct-detect__note {
	font-size: 12px;
	color: var(--muted);
}

.ct-home-rank {
	padding-top: 28px;
	padding-bottom: 8px;
}

.ct-home-plats {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-top: 24px;
	padding-bottom: 8px;
}

.ct-pgroup {
	padding: 20px 22px;
	border: 1px solid var(--line);
	border-radius: 12px;
}

.ct-pgroup__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	margin-bottom: 14px;
}

.ct-pgroup__title {
	margin: 0;
	font-size: 20px;
	color: var(--primary);
}

.ct-pgroup__count {
	font-size: 13px;
}

.ct-pgroup__head .ct-more {
	margin-left: auto;
}

.ct-pgroup__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 10px;
	list-style: none;
}

.ct-ccell {
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	padding: 12px 14px;
	border: 1px solid var(--line2);
	border-radius: 8px;
	background: var(--bg2);
	color: var(--fg);
}

a.ct-ccell:hover {
	border-color: var(--primary);
	color: var(--fg);
	text-decoration: none;
}

.ct-ccell__name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	font-weight: 600;
}

.ct-ccell__more {
	font-size: 12px;
	color: var(--muted);
}

.ct-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	margin: 20px 0;
	padding: 26px 30px;
	border-radius: 12px;
	background: var(--navy);
}

[data-theme="dark"] .ct-cta {
	border: 1px solid var(--line);
}

.ct-cta__text {
	flex: 1 1 400px;
}

.ct-cta h2 {
	margin: 0;
	font-size: 22px;
	color: #ffffff;
}

.ct-cta p {
	margin: 6px 0 0;
	font-size: 15px;
	color: var(--foot-fg);
}

/* ---------- 17. 客户端页 ---------- */
.ct-dlbox {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin: 20px 0 24px;
	padding: 18px 20px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--bg2);
}

.ct-dlbox__info {
	flex: 1 1 300px;
	min-width: 0;
}

.ct-prose .ct-dlbox p {
	margin: 0;
}

.ct-dlbox__title {
	font-size: 18px;
	font-weight: 800;
	line-height: 1.4;
	color: var(--primary);
}

.ct-prose .ct-dlbox .ct-dlbox__plats {
	margin-top: 2px;
	font-size: 14px;
	color: var(--fg);
}

.ct-prose .ct-dlbox .ct-dlbox__meta {
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--muted);
}

.ct-dlbox__meta b {
	color: var(--fg);
}

.ct-dlbox__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ct-related .ct-section-title {
	margin: 32px 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--line);
	font-size: 24px;
}

.ct-related__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.ct-related__card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: 10px;
	color: var(--fg);
}

a.ct-related__card:hover {
	border-color: var(--primary);
	color: var(--fg);
	text-decoration: none;
}

.ct-related__name {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 700;
}

.ct-related__meta {
	font-size: 13px;
	color: var(--muted);
}

/* ---------- 18. 平台页 ---------- */
.ct-pcards {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 12px 0 16px;
}

.ct-prow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: 10px;
}

.ct-prow__main {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.ct-prow__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ct-prow__name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}

.ct-prow__name > a,
.ct-prow__name > span:first-child {
	color: var(--fg);
}

.ct-prow__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	line-height: 1.4;
}

.ct-prow__actions {
	display: flex;
	gap: 8px;
}

.ct-unranked {
	margin: 0 0 20px;
	padding: 14px 16px;
	border: 1px dashed var(--line);
	border-radius: 10px;
}

.ct-prose .ct-unranked__title {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--muted);
}

.ct-unranked__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	padding: 8px 0;
}

.ct-unranked__row + .ct-unranked__row {
	border-top: 1px solid var(--line2);
}

.ct-unranked__name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	line-height: 1.5;
}

.ct-unranked__link {
	font-weight: 700;
}

.ct-unranked__note {
	font-size: 13px;
	color: var(--muted);
}

.ct-otherplat ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	list-style: none;
}

.ct-otherplat a {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 6px 8px;
	border-radius: 8px;
	color: var(--fg);
	font-size: 14px;
}

.ct-otherplat a:hover {
	background: var(--bg2);
	text-decoration: none;
}

/* ---------- 19. 排行榜、Clash下载：筛选 ---------- */
.ct-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 18px 0 14px;
}

.ct-chip {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--fg);
	font-size: 14px;
	font-weight: 600;
}

.ct-chip:hover {
	border-color: var(--primary);
	color: var(--primary);
	text-decoration: none;
}

.ct-chip[aria-pressed="true"] {
	border-color: var(--navy);
	background: var(--navy);
	color: #ffffff;
}

[data-theme="dark"] .ct-chip[aria-pressed="true"] {
	border-color: var(--primary);
	background: var(--tint);
	color: var(--primary);
}

.ct-retired {
	list-style: none;
	border: 1px solid var(--line);
	border-radius: 12px;
}

.ct-retired__row {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 2fr);
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	font-size: 15px;
}

.ct-retired__row + .ct-retired__row {
	border-top: 1px solid var(--line2);
}

.ct-retired__name > a,
.ct-retired__name > span {
	font-weight: 700;
	color: var(--fg);
}

.ct-retired__alt {
	font-size: 14px;
	color: var(--muted);
}

.ct-rules {
	background: var(--bg2);
	scroll-margin-top: 90px;
}

.ct-rules__title {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 800;
	color: var(--primary);
}

.ct-rules__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	list-style: none;
}

.ct-rules__row {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	font-weight: 600;
}

.ct-rules__pct {
	color: var(--primary);
}

.ct-rules__bar {
	height: 6px;
	margin: 6px 0;
	border-radius: 3px;
	background: var(--line2);
}

.ct-rules__bar span {
	display: block;
	height: 6px;
	border-radius: 3px;
	background: var(--primary);
}

.ct-rules__list p {
	margin: 0;
	font-size: 12px;
	color: var(--muted);
}

.ct-rules__note {
	margin: 14px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--line);
	font-size: 12px;
	line-height: 1.6;
	color: var(--muted);
}

/* ---------- 20. 节点购买 ---------- */
.ct-cmp {
	margin: 12px 0 28px;
}

.ct-cmp__table th[scope="row"] a {
	font-weight: 700;
}

.ct-prose .ct-cmp__table th,
.ct-prose .ct-cmp__table td {
	border: 0;
	border-top: 1px solid var(--line2);
	white-space: nowrap;
}

.ct-prose .ct-cmp__table thead th {
	border-top: 0;
	background: var(--bg2);
}

.ct-air {
	margin: 0 0 24px;
	padding: 20px 22px;
	border: 1px solid var(--line);
	border-radius: 12px;
}

.ct-air__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
}

.ct-prose .ct-air__head h3 {
	margin: 0;
	padding: 0;
	font-size: 21px;
	color: var(--primary) !important;
}

.ct-air__idx {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: var(--navy);
	color: #ffffff;
	font-size: 15px;
	font-weight: 800;
}

[data-theme="dark"] .ct-air__idx {
	background: var(--tint);
	color: var(--primary);
}

.ct-air__from {
	margin-left: auto;
	font-size: 15px;
	font-weight: 800;
	color: var(--amberText);
}

.ct-air__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 10px 0 14px;
}

.ct-air__tags span {
	padding: 2px 8px;
	border-radius: 5px;
	background: var(--tint);
	color: var(--primary);
	font-size: 12px;
	font-weight: 600;
}

.ct-prose .ct-air thead th {
	border-color: var(--navy);
	background: var(--navy);
	color: #ffffff;
}

[data-theme="dark"] .ct-prose .ct-air thead th {
	border-color: var(--line);
}

.ct-air__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.ct-prose .ct-air__actions .wp-block-buttons {
	margin: 0;
}

.ct-prose .ct-air__actions .wp-block-buttons + .wp-block-buttons .wp-block-button__link {
	border-color: var(--primary);
	background: transparent;
	color: var(--primary);
}

.ct-gcards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 0 0 16px;
}

.ct-gcard {
	padding: 16px 18px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg2);
}

.ct-prose .ct-gcard h3 {
	margin: 0 0 8px;
	font-size: 17px;
	color: var(--primary);
}

.ct-gcard p {
	font-size: 15px;
	line-height: 1.75;
}

.ct-gcard p:last-child {
	margin-bottom: 0;
}

.ct-prose .ct-steps {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.ct-steps li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 14px 10px;
	border: 1px solid var(--line);
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.ct-steps__n {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 800;
}

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

.ct-ccard {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: 10px;
	color: var(--fg);
}

.ct-ccard:hover {
	border-color: var(--primary);
	color: var(--fg);
	text-decoration: none;
}

.ct-ccard__t {
	font-size: 16px;
	font-weight: 700;
	color: var(--primary);
}

.ct-ccard__d {
	font-size: 14px;
	line-height: 1.6;
}

.ct-ccard__more {
	font-size: 13px;
	font-weight: 600;
	color: var(--primary);
}

/* ---------- 21. 404 ---------- */
.ct-404 {
	padding-top: 72px;
	padding-bottom: 72px;
	text-align: center;
}

.ct-404__code {
	margin: 0;
	font-size: 112px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -2px;
	color: var(--primary);
}

.ct-404__title {
	margin: 16px 0 8px;
	font-size: 28px;
	color: var(--fg);
}

.ct-404__desc {
	max-width: 520px;
	margin: 0 auto;
	font-size: 15px;
	line-height: 1.8;
	color: var(--muted);
}

.ct-404__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 22px 0 40px;
}

.ct-404__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	max-width: 900px;
	margin: 0 auto;
	text-align: left;
}

.ct-box {
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 12px;
}

.ct-box__title {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 800;
	color: var(--primary);
}

.ct-box .ct-toplist__item {
	padding: 4px 0;
	font-size: 15px;
}

.ct-platgrid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	list-style: none;
}

.ct-platgrid a {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 6px 10px;
	border: 1px solid var(--line2);
	border-radius: 8px;
	color: var(--fg);
	font-size: 14px;
}

.ct-platgrid a:hover {
	border-color: var(--primary);
	text-decoration: none;
}

/* ---------- 23. 广告位（阶段 3） ---------- */
/* 顶部横幅：1200×60 原尺寸，不留左右内边距，窗口变窄时等比缩小；用宽高比预留高度防止跳动 */
.ct-topads {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: var(--wrap);
	margin: 16px auto 0;
	padding: 0;
}

.ct-topads__item {
	display: block;
	aspect-ratio: 20 / 1;
	overflow: hidden;
	border-radius: 8px;
	background: var(--bg2);
}

.ct-topads__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 侧栏推广 */
.ct-promo {
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--bg2);
}

.ct-promo__title {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 700;
	color: var(--primary);
}

.ct-promo__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	list-style: none;
}

.ct-promo__item {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 10px;
	border: 1px solid var(--line2);
	border-radius: 8px;
	background: var(--bg);
	color: var(--fg);
}

.ct-promo__item:hover {
	border-color: var(--primary);
	color: var(--fg);
	text-decoration: none;
}

.ct-promo__logo {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	background: var(--tint);
	object-fit: cover;
}

.ct-promo__text {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	min-width: 0;
}

.ct-promo__name {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}

.ct-promo__desc {
	font-size: 12px;
	line-height: 1.5;
	color: var(--muted);
}

.ct-promo__btn {
	flex-shrink: 0;
	padding: 4px 8px;
	border-radius: 5px;
	background: var(--accent);
	color: var(--on-accent);
	font-size: 12px;
	font-weight: 700;
}

.ct-promo__note {
	margin: 10px 0 0;
	font-size: 12px;
	color: var(--muted);
}

.ct-doc__main > .ct-promo {
	margin-top: 32px;
}

/* 弹窗 */
.ct-popup {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 140px 16px 16px;
	background: rgba(15, 23, 42, 0.45);
	overflow-y: auto;
}

.ct-popup__box {
	width: 520px;
	max-width: 100%;
	padding: 28px;
	border-radius: 14px;
	background: var(--bg);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .ct-popup__box {
	border: 1px solid var(--line);
}

.ct-popup__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.ct-popup__title {
	flex-grow: 1;
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--primary);
}

.ct-popup__close {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 8px;
	background: var(--bg2);
	color: var(--muted);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.ct-popup__close:hover {
	color: var(--fg);
}

.ct-popup__media {
	display: block;
	overflow: hidden;
	border-radius: 10px;
	background: var(--bg2);
}

.ct-popup__media img {
	display: block;
	width: 100%;
	height: auto;
}

.ct-popup__cta {
	display: flex;
	width: 100%;
	margin-top: 16px;
}

.ct-popup__note {
	margin: 12px 0 0;
	font-size: 12px;
	color: var(--muted);
	text-align: center;
}

.ct-popup-open {
	overflow: hidden;
}

/* ---------- 24. 插件兼容（阶段 5） ---------- */
/* Ninja Tables：统一成主题表格样式，深色模式下也用主题颜色。
   插件自己的样式有的写在 id / 多重类名上，颜色这里用 !important 覆盖。 */
.ct-prose .ninja_table_wrapper,
.ct-prose .footable_parent {
	margin: 0 0 16px;
	border: 1px solid var(--line);
	border-radius: 10px;
	overflow-x: auto;
}

.ct-prose table.ninja_footable,
.ct-prose table.foo-table {
	width: 100%;
	margin: 0 !important;
	border: 0 !important;
	border-collapse: collapse !important;
	background: transparent !important;
	color: var(--fg) !important;
	font-size: 15px;
}

.ct-prose table.ninja_footable th,
.ct-prose table.ninja_footable td,
.ct-prose table.foo-table th,
.ct-prose table.foo-table td {
	padding: 9px 12px !important;
	border: 0 !important;
	border-top: 1px solid var(--line2) !important;
	background: transparent !important;
	color: var(--fg) !important;
	text-align: left;
	vertical-align: middle;
}

.ct-prose table.ninja_footable thead th,
.ct-prose table.foo-table thead th {
	border-top: 0 !important;
	background: var(--bg2) !important;
	color: var(--muted) !important;
	font-size: 13px;
	font-weight: 600;
}

.ct-prose table.ninja_footable tbody tr:nth-child(even) > td,
.ct-prose table.foo-table tbody tr:nth-child(even) > td {
	background: var(--bg2) !important;
}

.ct-prose table.ninja_footable a,
.ct-prose table.foo-table a {
	color: var(--primary) !important;
}

/* 筛选框、分页、展开按钮 */
.ct-prose .footable-filtering th,
.ct-prose .footable-paging td {
	background: var(--bg) !important;
}

.ct-prose .footable-filtering input,
.ct-prose .footable-filtering select,
.ct-prose .ninja_table_wrapper input[type="text"],
.ct-prose .ninja_table_wrapper select {
	min-height: 36px;
	padding: 6px 10px;
	border: 1px solid var(--line) !important;
	border-radius: 6px;
	background: var(--bg) !important;
	color: var(--fg) !important;
	font: inherit;
}

.ct-prose .footable-paging .pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ct-prose .footable-paging .pagination a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 8px;
	border: 1px solid var(--line) !important;
	border-radius: 6px;
	background: var(--bg) !important;
	color: var(--fg) !important;
}

.ct-prose .footable-paging .pagination .active a {
	border-color: var(--navy) !important;
	background: var(--navy) !important;
	color: #ffffff !important;
}

.ct-prose .footable-paging .label {
	color: var(--muted) !important;
	background: none !important;
}

.ct-prose .footable-toggle,
.ct-prose .fooicon {
	color: var(--primary) !important;
}

.ct-prose .footable-detail-row > td,
.ct-prose table.footable-details th,
.ct-prose table.footable-details td {
	background: var(--bg2) !important;
}

/* 插件「加载中」占位：表格高度固定后再显示，减少跳动 */
.ct-prose .ninja_table_wrapper.loading_ninja table {
	min-height: 120px;
}

/* OneSignal 订阅铃铛默认在右下角，和返回顶部按钮重叠时把返回顶部往上挪 */
body:has(#onesignal-bell-container) .ct-totop {
	bottom: 96px;
}

#onesignal-bell-container.onesignal-reset {
	z-index: 45 !important;
}

#onesignal-slidedown-container {
	z-index: 110 !important; /* 订阅提示要在页头（50）和弹窗（100）上面 */
}

/* Rank Math 面包屑 */
.ct-crumbs .rank-math-breadcrumb p {
	margin: 0;
}

.ct-crumbs .rank-math-breadcrumb a {
	color: var(--muted);
}

.ct-crumbs .rank-math-breadcrumb a:hover {
	color: var(--primary);
}

.ct-crumbs .rank-math-breadcrumb .separator {
	margin: 0 6px;
	color: var(--muted);
}

/* ---------- 22. 阶段 2 窄屏 ---------- */
@media (max-width: 1100px) {
	.ct-pgroup__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 1023px) {
	.ct-doc {
		flex-direction: column;
		gap: 24px;
		padding-top: 16px;
		padding-bottom: 48px;
	}

	.ct-doc__main,
	.ct-doc__side {
		flex: none;
		width: 100%;
		max-width: none;
	}

	.ct-side__sticky {
		position: static;
		max-height: none;
		overflow: visible;
	}

	/* 手机端目录放在正文里（可折叠），右栏目录不显示 */
	.ct-toc--side {
		display: none;
	}

	.ct-toc--inline {
		display: block;
	}

	.ct-only-desktop {
		display: none;
	}

	.ct-only-mobile {
		display: inline;
	}

	.ct-rank-extra {
		display: none;
	}

	/* 首页 Top 5：手机端只留名次、客户端、平台、下载 */
	.ct-hometable th:nth-child(4),
	.ct-hometable td:nth-child(4),
	.ct-hometable th:nth-child(5),
	.ct-hometable td:nth-child(5) {
		display: none;
	}

	.ct-h1--home {
		font-size: 28px;
	}

	.ct-lead {
		font-size: 16px;
	}

	.ct-hero {
		padding-top: 24px;
	}

	.ct-section-title,
	.ct-doc__main > .ct-section-title,
	.ct-related .ct-section-title {
		font-size: 21px;
	}

	.ct-pgroup {
		padding: 16px;
	}

	.ct-pgroup__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.ct-pgroup__head .ct-more {
		width: 100%;
		margin-left: 0;
	}

	.ct-cta {
		padding: 20px;
	}

	.ct-table th,
	.ct-table td {
		padding: 9px 10px;
	}

	.ct-related__grid,
	.ct-gcards,
	.ct-ccards,
	.ct-404__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ct-prose .ct-steps {
		grid-template-columns: minmax(0, 1fr);
	}

	.ct-steps li {
		flex-direction: row;
		text-align: left;
	}

	.ct-retired__row {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.ct-retired__alt {
		grid-column: 1 / -1;
	}

	.ct-air {
		padding: 16px;
	}

	.ct-air__from {
		width: 100%;
		margin-left: 0;
	}

	.ct-404 {
		padding-top: 40px;
		padding-bottom: 32px;
	}

	.ct-404__code {
		font-size: 72px;
	}

	.ct-404__title {
		font-size: 22px;
	}

	.ct-dlbox__actions {
		width: 100%;
	}

	.ct-dlbox__actions .ct-btn {
		flex: 1 1 0;
	}
}
