/* ============================================================================
   TLBB Lua 接口知识库 —— 站点样式
   发布目标：XueWuTheme/resources/site.css（由扩展统一加载）
   维护：H:/TLBB/.codex_tmp/build-server-lua-wiki.cjs 与 build-client-lua-wiki.cjs
        生成的页面只写 class，正文里不再出现 style="..."。
   为什么必须外置：MediaWiki 内置搜索（本站没有 CirrusSearch）生成结果摘要时
   直接截取页面的原始 wikitext，内联样式会被整段显示在摘要里；外置前内联样式
   占 2841 个页面正文的 56.2%。
   改这份文件前先确认没有页面还在用被删掉的 class：
   H:/TLBB/.codex_tmp/stat-common-css-usage.cjs 可列出当前实际用到的 class。
   ========================================================================== */

.lua-reference {
	max-width: 1200px;
	margin: 0 auto;
	line-height: 1.8;
	color: #29343a;
	font-family: Arial, 'Microsoft YaHei', 'PingFang SC', sans-serif;
	letter-spacing: 0;
	overflow-wrap: anywhere;
}

/* ---- 标题层级 ---- */
.lua-title { font-size: 25px; font-weight: bold; color: #193d37; }
.lua-h1 { font-size: 22px; font-weight: bold; color: #193d37; }
.lua-sub { margin-top: 6px; color: #657078; }
.lua-sub-lg { margin-top: 10px; color: #657078; }

/* ---- 导语与分隔线 ---- */
.lua-lead { padding: 14px 0; border-top: 3px solid #287568; }
.lua-rule { border-bottom: 1px solid #dbe3e6; }
.lua-index-head { padding: 18px 0; border-top: 4px solid #287568; border-bottom: 1px solid #dbe3e6; }
.lua-lead.lua-accent-red { border-top-color: #a36761; }
.lua-lead.lua-accent-teal { border-top-color: #597c66; }
.lua-lead.lua-accent-amber { border-top-color: #7c6a59; }

/* ---- 次要文字 ---- */
.lua-muted { color: #657078; }
.lua-warn { color: #a08a6a; }
.lua-note {
	margin-top: 20px;
	padding-top: 10px;
	border-top: 1px solid #dbe3e6;
	color: #657078;
	font-size: 12px;
}

/* ---- 代码：用元素选择器，页面里连 class 都不用写 ---- */
.lua-reference code {
	white-space: normal;
	overflow-wrap: anywhere;
}
.lua-reference pre {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	font-size: 13px;
	line-height: 1.7;
	padding: 12px;
	background: #f5f7f8;
	border: 1px solid #dbe3e6;
}

/* ---- 表格 ---- */
.lua-reference table.wikitable {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 13px;
}
.lua-reference table.wikitable th {
	text-align: left;
	background: #edf3f2;
	padding: 8px;
	vertical-align: top;
	overflow-wrap: anywhere;
}
.lua-reference table.wikitable td {
	padding: 8px;
	vertical-align: top;
	overflow-wrap: anywhere;
}

/* ---- 表格列宽
   build 侧只允许下表登记过的宽度（.codex_tmp 里的 WIDTHS 常量），
   出现新宽度会直接抛错，避免页面写了 class 却没有对应规则。 ---- */
.lua-reference .lua-w9 { width: 9%; }
.lua-reference .lua-w10 { width: 10%; }
.lua-reference .lua-w11 { width: 11%; }
.lua-reference .lua-w18 { width: 18%; }
.lua-reference .lua-w22 { width: 22%; }
.lua-reference .lua-w25 { width: 25%; }
.lua-reference .lua-w26 { width: 26%; }
.lua-reference .lua-w36 { width: 36%; }
.lua-reference .lua-w38 { width: 38%; }
.lua-reference .lua-w42 { width: 42%; }
.lua-reference .lua-w44 { width: 44%; }
.lua-reference .lua-w46 { width: 46%; }
.lua-reference .lua-w60 { width: 60%; }

/* XueWu 雪舞天龙 · 首页主题。正文资料页继续使用既有 .lua-reference 样式。 */
body.skin-monobook.page-Main_Page {
  background: #f1f4f8;
  color: #24344a;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}
body.page-Main_Page #content {
  margin-top: 3.4em;
  padding: 24px 28px;
  border: 1px solid #dce3ec;
  border-radius: 12px 0 0 12px;
  background: #fff;
}
body.page-Main_Page #firstHeading,
body.page-Main_Page #contentSub { display: none; }
body.page-Main_Page #p-cactions { top: 1.6em; }
body.page-Main_Page #p-cactions li {
  border-color: #dce3ec;
  border-radius: 5px 5px 0 0;
  background: #f8fafc;
}
body.page-Main_Page #p-cactions li a { background: transparent; color: #536781; }
body.page-Main_Page #p-cactions li.selected { border-bottom-color: #fff; background: #fff; }
body.page-Main_Page .portlet h3 { padding: 10px 12px 5px; color: #758398; font-size: 12px; }
body.page-Main_Page .pBody { border: 0; background: transparent; padding: 3px 12px 12px; }
body.page-Main_Page .pBody a { color: #455e7d; }
body.page-Main_Page .pBody ul { line-height: 1.95; }
body.page-Main_Page #searchInput { box-sizing: border-box; width: 100%; border: 1px solid #cdd7e4; border-radius: 4px; padding: 5px; }
body.page-Main_Page #footer { background: transparent; border-color: #dce3ec; color: #748297; }
#p-logo a.mw-wiki-logo {
  background-image: url(assets/xuewu-cyber-logo-v2.webp?v=1.0.1);
  background-position: center;
  background-size: 140px 140px;
  background-repeat: no-repeat;
}
.tlbb-wiki-home {
  max-width: 1180px;
  margin: 0 auto;
  color: #24344a;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.tlbb-wiki-home a { color: #385d88; text-decoration: none; }
.tlbb-wiki-home a:hover { color: #946b2f; text-decoration: underline; }
.tlbb-wiki-home a:focus-visible { outline: 2px solid #b58b4b; outline-offset: 4px; }
.tlbb-wiki-home .home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 42px 40px 30px;
  border-radius: 8px;
  background: linear-gradient(115deg, #14243b, #263d5b);
  color: #f5f8fc;
  box-shadow: none;
}
.tlbb-wiki-home .home-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 88px;
  background: linear-gradient(155deg, transparent 38%, #334a65 38.2%, #263c56 55%, transparent 55.2%), linear-gradient(25deg, #1a3049 25%, transparent 25.2%);
  opacity: .6;
}
.tlbb-wiki-home .home-crest {
  position: absolute;
  z-index: -1;
  top: 28px;
  right: 32px;
  width: 225px;
  height: 225px;
  background: url(assets/xuewu-emblem.svg?v=1.0.1) center / contain no-repeat;
  opacity: .9;
}
.tlbb-wiki-home .home-kicker { color: #d8bd8c; font-size: 11px; letter-spacing: .22em; }
.tlbb-wiki-home .home-brand { margin-top: 20px; color: #bac9db; font-size: 13px; letter-spacing: .12em; }
.tlbb-wiki-home .home-title {
  max-width: 65%;
  margin: 10px 0 16px;
  border: 0;
  color: #f5f8fc;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1.4;
}
.tlbb-wiki-home .home-lead { max-width: 62%; margin: 0; color: #c1cedd; font-size: 13px; line-height: 1.9; }
.tlbb-wiki-home .home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tlbb-wiki-home .home-btn { display: inline-flex; padding: 0; border: 1px solid #65758a; border-radius: 4px; background: transparent; font-size: 13px; line-height: 1.6; transform: none; }
.tlbb-wiki-home .home-btn a { display: block; padding: 9px 15px; color: #eef4fc; text-decoration: none; }
.tlbb-wiki-home .home-btn:hover { background: #334b68; transform: none; }
.tlbb-wiki-home .home-btn-primary { border-color: #ddc08d; background: #ddc08d; font-weight: 700; }
.tlbb-wiki-home .home-btn-primary a { color: #1b2b42; }
.tlbb-wiki-home .home-btn-primary:hover { background: #ecd6ac; }
.tlbb-wiki-home .home-hero-foot { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 30px; padding-top: 15px; border-top: 1px solid #53647a; color: #acbdd0; font-size: 11px; letter-spacing: .07em; }
.tlbb-wiki-home .home-hero-foot b { margin-right: 6px; color: #d9c49e; font-weight: 400; }
.tlbb-wiki-home .home-nav { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 18px 0 0; padding: 8px 0 17px; border-bottom: 1px solid #e2e7ef; font-size: 12px; }
.tlbb-wiki-home .home-nav a { color: #65768b; }
.tlbb-wiki-home .home-section { margin-top: 32px; }
.tlbb-wiki-home .home-h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 18px; padding: 0; border: 0; color: #20344f; font-family: inherit; font-size: 20px; font-weight: 700; }
.tlbb-wiki-home .home-h2 span.home-section-no { color: #ad8b56; font-family: Georgia, serif; font-size: 16px; font-weight: 400; }
.tlbb-wiki-home .home-section-caption { margin: -12px 0 18px; color: #7a8798; font-size: 12px; }
.tlbb-wiki-home .home-grid { display: grid; gap: 14px; }
.tlbb-wiki-home .home-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tlbb-wiki-home .home-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tlbb-wiki-home .home-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 22px 20px 18px; border: 1px solid #dfe6ef; border-radius: 6px; background: #fbfcfe; transition: border-color .15s ease, background .15s ease; }
.tlbb-wiki-home .home-card:hover { border-color: #a9b9ce; background: #f5f8fc; }
.tlbb-wiki-home .home-card-label { margin-bottom: 16px; color: #8a7453; font-family: Consolas, monospace; font-size: 10px; letter-spacing: .1em; }
.tlbb-wiki-home .home-h3 { margin: 0 0 8px; color: #263b57; font-size: 16px; font-weight: 700; }
.tlbb-wiki-home .home-card p { margin: 0 0 14px; color: #758297; font-size: 12px; }
.tlbb-wiki-home .home-card-links { font-size: 12.5px; line-height: 2.15; }
.tlbb-wiki-home .home-code { margin-top: auto; padding-top: 13px; color: #8a97a7; font-family: Consolas, monospace; font-size: 11px; line-height: 1.9; }
.tlbb-wiki-home .home-code a { color: #617c9c; }
.tlbb-wiki-home .home-table table { width: 100%; margin: 0; border-collapse: collapse; table-layout: fixed; font-size: 12.5px; }
.tlbb-wiki-home .home-table th { padding: 12px 16px; border: 1px solid #dce4ee; background: #edf2f8; color: #455e7d; text-align: left; }
.tlbb-wiki-home .home-table td { padding: 13px 16px; border: 1px solid #e1e7ef; background: #fff; vertical-align: top; }
.tlbb-wiki-home .home-table tr:nth-child(odd) td { background: #f8fafd; }
.tlbb-wiki-home .home-table th:nth-child(1) { width: 22%; }
.tlbb-wiki-home .home-table th:nth-child(2) { width: 43%; }
.tlbb-wiki-home code { padding: 2px 4px; border: 0; border-radius: 3px; background: #edf2f8; color: #466487; font-size: .95em; white-space: normal; overflow-wrap: anywhere; }
.tlbb-wiki-home .home-panel { min-width: 0; padding: 22px; border: 1px solid #dfe6ef; border-radius: 6px; background: #fbfcfe; }
.tlbb-wiki-home .home-pre { margin: 14px 0; padding: 18px; border: 0; border-left: 2px solid #bc995d; border-radius: 3px; background: #1c2d44; color: #d6e3f2; font-family: Consolas, monospace; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.tlbb-wiki-home .home-note { margin-bottom: 10px; color: #758297; font-size: 12px; }
.tlbb-wiki-home .home-faq { padding: 10px 0; border-bottom: 1px solid #e2e8f0; font-size: 12.5px; }
.tlbb-wiki-home .home-faq:last-child { border-bottom: 0; }
.tlbb-wiki-home .home-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; padding: 5px 20px; border: 1px solid #e0e7f0; border-radius: 6px; background: #fbfcfe; }
.tlbb-wiki-home .home-links a { display: block; padding: 11px 0; border-bottom: 1px solid #e5ebf2; font-size: 12.5px; }
.tlbb-wiki-home .home-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 22px; margin-top: 36px; padding: 20px 0 0; border-top: 1px solid #e1e7ef; color: #8792a2; font-size: 11px; }
.tlbb-wiki-home .home-footer-brand { color: #314b6b; font-family: Georgia, "Microsoft YaHei", serif; font-size: 14px; }
@media (max-width: 1150px) {
  .tlbb-wiki-home .home-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tlbb-wiki-home .home-crest { right: 20px; top: 45px; width: 180px; height: 180px; opacity: .6; }
  .tlbb-wiki-home .home-title { font-size: 34px; }
}
@media (max-width: 780px) {
  body.page-Main_Page #content { padding: 18px; }
  .tlbb-wiki-home .home-hero { padding: 30px 26px 24px; }
  .tlbb-wiki-home .home-crest { right: 12px; top: 35px; width: 150px; height: 150px; opacity: .18; }
  .tlbb-wiki-home .home-title, .tlbb-wiki-home .home-lead { max-width: 100%; }
  .tlbb-wiki-home .home-grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  body.page-Main_Page #content { padding: 14px; border-radius: 0; }
  .tlbb-wiki-home .home-grid-3, .tlbb-wiki-home .home-links { grid-template-columns: minmax(0, 1fr); }
  .tlbb-wiki-home .home-hero { padding: 28px 22px 22px; }
  .tlbb-wiki-home .home-kicker { font-size: 9px; letter-spacing: .16em; }
  .tlbb-wiki-home .home-title { font-size: 30px; }
  .tlbb-wiki-home .home-brand { font-size: 11px; }
  .tlbb-wiki-home .home-lead { font-size: 12px; }
  .tlbb-wiki-home .home-actions { gap: 8px; margin-top: 22px; }
  .tlbb-wiki-home .home-btn { font-size: 12px; }
  .tlbb-wiki-home .home-btn a { padding: 8px 12px; }
  .tlbb-wiki-home .home-hero-foot { gap: 6px 14px; font-size: 10px; }
  .tlbb-wiki-home .home-nav { gap: 8px 18px; }
  .tlbb-wiki-home .home-h2 { font-size: 18px; }
  .tlbb-wiki-home .home-table table, .tlbb-wiki-home .home-table tbody,
  .tlbb-wiki-home .home-table tr, .tlbb-wiki-home .home-table td { display: block; width: 100%; }
  .tlbb-wiki-home .home-table thead, .tlbb-wiki-home .home-table tr:first-child,
  .tlbb-wiki-home .home-table th { display: none; }
  .tlbb-wiki-home .home-table tr { box-sizing: border-box; margin-bottom: 10px; padding: 12px 16px; border: 1px solid #dfe6ef; border-radius: 5px; background: #fbfcfe; }
  .tlbb-wiki-home .home-table td, .tlbb-wiki-home .home-table tr:nth-child(odd) td { box-sizing: border-box; padding: 4px 0; border: 0; background: transparent; }
  .tlbb-wiki-home .home-table td::before { content: attr(data-label); display: block; color: #8492a4; font-size: 10px; }
}