/* 酷汇返佣 · 全站共享的返佣模块样式（论坛列表/详情、门户内容页复用）
   v7「墨线卷宗 / Ink & Ledger」：墨蓝面板 + 账本竖纹 + 琥珀账号线，与插件侧
   hl_plist_page.css / kh_event.css / broker_info_module 同一套语言。
   依赖 hl_tokens.css 提供的 --ink/--amber/--mono 等令牌，需在其之后加载。 */

/* ---------- 顶部胶囊 CTA ---------- */
.kh-hcta, a.kh-hcta {
	display: inline-block; height: 38px; line-height: 38px; padding: 0 20px;
	border-radius: 4px; font-size: 14px; font-weight: 700; letter-spacing: .5px;
	color: #211403 !important; background: linear-gradient(180deg, #F2BC52, #D68F1E);
	box-shadow: inset 0 -2px 0 rgba(122,72,10,.45), 0 8px 20px -12px rgba(169,108,20,.75);
	transition: filter .18s ease;
}
.kh-hcta:hover { color: #211403 !important; filter: brightness(.97); }

/* ---------- 侧栏返佣卡 ---------- */
.kh-scard {
	position: relative; overflow: hidden;
	margin-bottom: 15px; padding: 16px 16px 16px; border-radius: 8px; color: #fff;
	background:
		repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 28px),
		radial-gradient(320px 160px at 100% 0%, rgba(233,168,59,.22), transparent 68%),
		linear-gradient(150deg, #0A1C2E, #0B2A42 52%, #14456B);
	box-shadow: 0 16px 34px -22px rgba(10,28,46,.9);
}
.kh-scard:after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
	background: linear-gradient(90deg, #E9A83B, #D68F1E 55%, rgba(169,108,20,.35));
}
.kh-scard .kh-slab { font-size: 12px; color: #E9A83B; letter-spacing: 1.5px; }
.kh-scard .kh-spt { margin-top: 6px; font-size: 17px; font-weight: 700; line-height: 1.35; }
.kh-scard .kh-spt a { color: #fff; }
.kh-scard .kh-srow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.62); }
.kh-scard .kh-srow b { font-family: var(--mono); font-size: 15px; font-weight: 700; color: #fff; }
.kh-scard .kh-srow b.kh-hi { color: #E9A83B; }
.kh-scard .kh-sreg { margin-top: 10px; font-size: 11px; color: rgba(255,255,255,.45); line-height: 1.6; }
.kh-scard .hh-btn { display: block; margin-top: 14px; padding: 11px 0; text-align: center; font-size: 14px; position: relative; z-index: 2; }
.kh-scard .kh-smore { display: block; margin-top: 9px; text-align: center; font-size: 12px; color: rgba(255,255,255,.62); }
.kh-scard .kh-smore:hover { color: #E9A83B; }

/* ---------- 侧栏平台对照清单 ---------- */
.kh-slist { margin: 0; padding: 0; list-style: none; }
.kh-slist li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kh-slist li:last-child { border-bottom: 0; }
.kh-slist .kh-n { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-2); }
.kh-slist .kh-n:hover { color: var(--amber); }
.kh-slist .kh-v { flex: 0 0 auto; font-family: var(--mono); font-size: 12px; color: var(--amber); background: var(--amber-bg); border: 1px solid #E8D9B4; border-radius: 3px; padding: 0 6px; white-space: nowrap; }
.kh-slist .kh-go { flex: 0 0 auto; font-size: 12px; color: #211403 !important; background: linear-gradient(180deg, #F2BC52, #D68F1E); border-radius: 3px; padding: 3px 9px; white-space: nowrap; box-shadow: inset 0 -1px 0 rgba(122,72,10,.4); }
.kh-slist .kh-go:hover { color: #211403 !important; filter: brightness(.97); }

/* ---------- 侧栏热门讨论 ---------- */
.kh-sth { margin: 0; padding: 0; list-style: none; counter-reset: kh; }
.kh-sth li { display: flex; gap: 9px; align-items: flex-start; min-width: 0; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.kh-sth li:last-child { border-bottom: 0; }
.kh-sth li::before { counter-increment: kh; content: counter(kh); flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; border-radius: 3px; font-family: var(--mono); font-size: 11px; line-height: 18px; text-align: center; color: var(--ink-3); background: #F2F5F8; border: 1px solid var(--line); }
.kh-sth li:nth-child(-n+3)::before { color: #211403; background: var(--amber); border-color: var(--amber-d); }
.kh-sth .kh-bd { flex: 1 1 auto; min-width: 0; }
.kh-sth a { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 20px; color: var(--ink-2); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
.kh-sth a:hover { color: var(--amber); }
.kh-sth .kh-m { display: block; margin-top: 2px; font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.kh-sfoot { margin: 9px 0 0; text-align: right; font-size: 12px; }
.kh-sfoot a { color: var(--ink-3); }
.kh-sfoot a:hover { color: var(--amber); }

/* ---------- 正文内返佣条 ---------- */
.kh-inbar { position: relative; overflow: hidden;
	display: flex; align-items: center; gap: 14px; margin: 14px 0; padding: 14px 18px 16px; border-radius: 8px; color: #fff;
	background:
		repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 28px),
		radial-gradient(420px 160px at 100% -30%, rgba(233,168,59,.22), transparent 70%),
		linear-gradient(150deg, #0A1C2E, #0B2A42 52%, #14456B);
	box-shadow: 0 14px 34px -20px rgba(10,28,46,.6); }
.kh-inbar:after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
	background: linear-gradient(90deg, #E9A83B, #D68F1E 55%, rgba(169,108,20,.35));
}
.kh-inbar .kh-itx { flex: 1 1 auto; min-width: 0; }
.kh-inbar .kh-itx p { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.5; }
.kh-inbar .kh-itx span { display: block; margin-top: 3px; font-size: 12px; color: rgba(255,255,255,.62); }
.kh-inbar .kh-ipt { flex: 0 0 auto; font-family: var(--mono); font-size: 12px; color: #E9A83B; }
.kh-inbar .hh-btn { flex: 0 0 auto; padding: 10px 22px; font-size: 14px; position: relative; z-index: 2; }

/* ---------- 悬浮返佣条 ---------- */
.kh-float { position: fixed; right: 22px; bottom: 26px; z-index: 999; display: flex; align-items: center; gap: 10px;
	padding: 10px 12px; border-radius: 8px; color: #fff;
	background: linear-gradient(150deg, rgba(10,28,46,.96), rgba(20,69,107,.94));
	border: 1px solid rgba(233,168,59,.28);
	box-shadow: 0 18px 40px -18px rgba(10,28,46,.95);
	opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .25s, transform .25s, visibility .25s; }
.kh-float.show { opacity: 1; visibility: visible; transform: none; }
.kh-float p { margin: 0; padding-left: 12px; font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.62); }
.kh-float p b { display: block; font-size: 13px; color: #fff; }
.kh-float .hh-btn { padding: 9px 18px; font-size: 13px; }

/* ---------- 通用侧栏白卡（搜索页 / 导读页复用） ---------- */
.kh-box { margin-bottom: 15px; background: var(--card); border: 1px solid var(--line); border-radius: 8px;
	overflow: hidden; box-shadow: 0 10px 26px -22px rgba(10,28,46,.6); }
.kh-box > h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 13px 16px;
	font-size: 15px; font-weight: 700; color: #fff; background: linear-gradient(150deg, #0A1C2E, #0B2A42 70%, #14456B); }
.kh-box > h3::before { content: ''; flex: 0 0 auto; width: 3px; height: 14px; border-radius: 2px;
	background: linear-gradient(180deg, #E9A83B, #A96C14); }
.kh-box > h3 a { margin-left: auto; font-size: 12px; font-weight: 400; color: rgba(255,255,255,.62); }
.kh-box > h3 a:hover { color: #E9A83B; }
.kh-box .kh-box-bd { padding: 4px 16px 14px; }
.kh-box .kh-box-txt { margin: 10px 0 14px; padding: 0 16px; font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.kh-box .kh-box-txt b { color: var(--amber); }
.kh-box .kh-box-cta { display: block; margin: 0 16px 10px; padding: 11px 0; text-align: center; border-radius: 6px;
	font-size: 14px; font-weight: 700; color: #211403 !important;
	background: linear-gradient(180deg, #F2BC52, #D68F1E);
	box-shadow: inset 0 -2px 0 rgba(122,72,10,.45), 0 8px 20px -12px rgba(169,108,20,.75); }
.kh-box .kh-box-cta:hover { filter: brightness(.97); color: #211403 !important; }
.kh-box .kh-box-more { display: block; margin-bottom: 6px; text-align: center; font-size: 12px; color: var(--ink-3); }
.kh-box .kh-box-more:hover { color: var(--amber); }

@media (max-width: 1024px) {
	.kh-box { margin-bottom: 12px; }
}

@media (max-width: 1024px) {
	.kh-float { right: 12px; left: 12px; bottom: calc(12px + constant(safe-area-inset-bottom)); bottom: calc(12px + env(safe-area-inset-bottom)); justify-content: space-between; }
	.kh-inbar { flex-wrap: wrap; }
	.kh-inbar .hh-btn { width: 100%; text-align: center; }
}

/* ---------- 文章页经纪商返佣模块（原 broker_info_module.inc.php 内联样式） ---------- */
.broker-info-module {
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 16px 20px;
	overflow: hidden;
	background:
		repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 28px),
		radial-gradient(520px 220px at 92% -40%, rgba(233,168,59,.2), transparent 66%),
		linear-gradient(150deg, #0A1C2E 0%, #0B2A42 46%, #14456B 100%);
	border-radius: 8px;
	margin: 14px 0 20px 0;
	box-shadow: 0 14px 34px -18px rgba(10,28,46,.55);
}
.broker-info-module:after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: linear-gradient(90deg, #E9A83B, #D68F1E 55%, rgba(169,108,20,.35));
}
.broker-info-module-logo { flex-shrink: 0; }
.broker-info-module-logo img {
	width: 100px;
	height: 68px;
	padding: 6px;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #E4E9EF;
	border-radius: 4px;
	object-fit: contain;
}
.broker-info-module-txt { flex: 1; }
.broker-info-module-txt-title {
	display: block;
	font-size: 17px;
	color: #fff;
	margin-bottom: 8px;
	font-weight: 700;
	letter-spacing: .3px;
}
.broker-info-module-txt-info {
	font-size: 13px;
	color: rgba(255,255,255,.66);
	line-height: 1.75;
	margin: 0;
}
.broker-promo-code {
	display: inline-block;
	padding: 2px 8px;
	background: #FBF2E0;
	border: 1px solid #E8D9B4;
	color: #A96C14;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-weight: 700;
	border-radius: 3px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.broker-promo-code:hover { background: #E9A83B; color: #211403; }
.broker-info-module-buttons { flex-shrink: 0; }
.broker-info-module-btn {
	display: inline-block;
	padding: 11px 22px;
	background: linear-gradient(180deg, #F2BC52, #D68F1E);
	color: #211403 !important;
	text-decoration: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .4px;
	box-shadow: inset 0 -2px 0 rgba(122,72,10,.45), 0 8px 20px -12px rgba(169,108,20,.9);
	transition: filter 0.2s;
	white-space: nowrap;
	position: relative;
	z-index: 2;
}
.broker-info-module-btn:hover { filter: brightness(.97); color: #211403 !important; }

@media (max-width: 768px) {
	.broker-info-module {
		flex-direction: column;
		text-align: center;
		padding: 18px 15px;
		margin: 10px;
	}
	.broker-info-module-logo img {
		width: 120px;
		max-height: none;
	}
	.broker-info-module-txt-title { font-size: 16px !important; }
	.broker-info-module-txt-info { font-size: 14px !important; }
	.broker-promo-code { font-size: 15px !important; padding: 4px 12px !important; }
	.broker-info-module-btn { padding: 12px 20px !important; font-size: 15px !important; }
}
