/* ============================================================
   AI跨境灯塔 · 知识库阅读页 / 总览页
   ------------------------------------------------------------
   与首页同一套语言：深海墨底、暖珍珠文字、金色发丝线。
   正文排版偏“长文阅读”：衬线标题 + 无衬线正文，行高松、留白重。
   ============================================================ */

:root{
  --ink:        #050A1C;
  --ink-2:      #070E22;
  --ink-3:      #0A142C;
  --pearl:      #F4EFE2;
  --gold:       #F6C453;
  --gold-lt:    #FFE9A6;
  --gold-deep:  #DE9A28;
  --muted:      rgba(244,239,226,.62);
  --muted-2:    rgba(244,239,226,.42);
  --hair:       rgba(233,214,164,.16);
  --hair-soft:  rgba(233,214,164,.09);

  --font-display:"Source Han Serif SC","Noto Serif SC","STZhongsong","Songti SC","SimSun",serif;
  --font-ui:"Microsoft YaHei","PingFang SC","Hiragino Sans GB","Noto Sans SC",sans-serif;
  --font-latin:"Palatino Linotype","Georgia","Times New Roman",serif;
  --font-mono:"JetBrains Mono","SFMono-Regular",Consolas,"Liberation Mono",monospace;

  --pad-x:clamp(20px,4.6vw,68px);
  --ease:cubic-bezier(.22,1,.36,1);
  --max:1200px;
}

*{box-sizing:border-box;}
html{background:var(--ink);-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:calc(var(--nav-h) + 28px);}
body{
  margin:0;
  background:var(--ink);
  color:var(--pearl);
  font-family:var(--font-ui);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
img{display:block;max-width:100%;}
a{color:inherit;text-decoration:none;}
::selection{background:rgba(246,196,83,.24);color:#fff;}
:focus-visible{outline:2px solid var(--gold-lt);outline-offset:4px;border-radius:2px;}

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

/* ---------- 顶部阅读进度 ---------- */
.kb-progress{
  position:fixed;top:0;left:0;right:0;height:2px;z-index:80;
  background:transparent;pointer-events:none;
}
.kb-progress span{
  display:block;height:100%;width:0;
  background:linear-gradient(90deg,var(--gold-deep),var(--gold),var(--gold-lt));
  box-shadow:0 0 12px rgba(246,196,83,.45);
  transition:width .1s linear;
}

/* ---------- 顶部导航（沿用 assets/nav.css 主体） ----------
   面包屑 .nav-crumb 在 assets/nav.css 里统一定义，
   文章页只负责填「首页 / 模块 / 当前页」三层文字。 */
.kb-nav .nav__inner{gap:20px;}
.kb-nav__spacer{flex:1;}
.kb-nav__all{
  display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 16px;
  border:1px solid var(--hair);border-radius:999px;
  font-size:12px;letter-spacing:.1em;color:var(--pearl);
  transition:border-color .3s var(--ease),color .3s var(--ease),background .3s var(--ease);
}
.kb-nav__all svg{width:12px;height:12px;fill:none;stroke:var(--gold);stroke-width:1.5;}
.kb-nav__all:hover{border-color:rgba(246,196,83,.5);color:var(--gold-lt);background:rgba(246,196,83,.05);}

/* 嵌入首页 iframe 时：导航由首页提供 */
html.is-embed .kb-nav{display:none;}
html.is-embed{scroll-padding-top:24px;}

/* ---------- 文章页外壳 ---------- */
.kb-main{
  position:relative;
  padding:calc(var(--nav-h) + 64px) 0 120px;
}
.kb-main::before{
  content:"";
  position:absolute;inset:0 0 auto;height:640px;z-index:-1;
  background:
    radial-gradient(680px 340px at 18% -6%, rgba(246,196,83,.11), transparent 68%),
    radial-gradient(520px 280px at 92% 4%, rgba(96,140,255,.07), transparent 70%);
  pointer-events:none;
}
html.is-embed .kb-main{padding-top:52px;}
.kb-article{max-width:var(--max);margin:0 auto;padding:0 var(--pad-x);}

/* ---------- 文章头 ----------
   标签（.kb-meta）在标题上方作眉标，标题 → 摘要 → 头部底线 → 正文 */
.kb-head{
  max-width:880px;
  padding-bottom:26px;border-bottom:1px solid var(--hair-soft);
}
.kb-title{
  margin:0 0 24px;
  font-family:var(--font-display);font-weight:600;
  font-size:clamp(32px,4.4vw,54px);line-height:1.16;letter-spacing:-.01em;
  text-wrap:balance;
}
.kb-lead{
  margin:0 0 30px;max-width:720px;
  font-size:clamp(15px,1.2vw,17px);line-height:1.95;color:rgba(244,239,226,.7);
}
.kb-meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;
  margin:0 0 24px;
  font-size:12px;letter-spacing:.08em;color:var(--muted-2);
}
/* 文章标签：与首页 .sub__label 共用一套「按类型着色」，
   同一类型同一颜色（青 / 蓝 / 橙 / 紫 / 绿 / 粉 / 珊瑚 / 靛 / 沙），
   尺寸放大到 36px 高，作为标题上方的眉标 */
.kb-tag{
  --tag-rgb: 233, 214, 164;
  display:inline-flex;align-items:center;height:36px;padding:0 20px 1px;
  border:1px solid rgba(var(--tag-rgb),.34);border-radius:999px;
  color:rgba(var(--tag-rgb),.92);letter-spacing:.12em;font-size:15px;font-weight:500;
  background:rgba(var(--tag-rgb),.08);
  white-space:nowrap;
}
.kb-tag[data-tag="工具"]{--tag-rgb: 126, 214, 202;}  /* 青 */
.kb-tag[data-tag="教程"]{--tag-rgb: 110, 180, 255;}  /* 蓝 */
.kb-tag[data-tag="实测"]{--tag-rgb: 255, 174, 112;}  /* 橙 */
.kb-tag[data-tag="资料"]{--tag-rgb: 210, 160, 255;}  /* 紫 */
.kb-tag[data-tag="系统"]{--tag-rgb: 150, 214, 150;}  /* 绿 */
.kb-tag[data-tag="模板"]{--tag-rgb: 244, 170, 196;}  /* 粉 */
.kb-tag[data-tag="报告"]{--tag-rgb: 255, 142, 132;}  /* 珊瑚 */
.kb-tag[data-tag="方法"]{--tag-rgb: 160, 160, 255;}  /* 靛 */
.kb-tag[data-tag="手册"]{--tag-rgb: 226, 205, 160;}  /* 沙 */
.kb-meta__dot{width:3px;height:3px;border-radius:50%;background:rgba(233,214,164,.3);}
.kb-meta__source{color:var(--muted-2);}

.kb-cta-row{display:flex;flex-wrap:wrap;gap:12px;margin-top:26px;}
.kb-cta{
  display:inline-flex;align-items:center;gap:9px;height:44px;padding:0 22px;
  border-radius:999px;border:1px solid rgba(246,196,83,.4);
  background:linear-gradient(180deg,rgba(246,196,83,.14),rgba(246,196,83,.05));
  color:var(--gold-lt);font-size:13px;letter-spacing:.06em;
  transition:transform .3s var(--ease),border-color .3s var(--ease),background .3s var(--ease);
}
.kb-cta:hover{transform:translateY(-1px);border-color:rgba(246,196,83,.75);background:linear-gradient(180deg,rgba(246,196,83,.22),rgba(246,196,83,.08));}
/* 箭头统一为一个「>」形折线，置于文字右侧 */
.kb-cta__arrow{
  flex:none;width:13px;height:13px;
  fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;
  transition:transform .3s var(--ease);
}
.kb-cta:hover .kb-cta__arrow{transform:translateX(3px);}

/* ---------- 正文布局 ---------- */
.kb-layout{
  display:grid;grid-template-columns:minmax(0,1fr);gap:0;
  margin-top:46px;
}
.kb-body{min-width:0;max-width:780px;}

/* 目录 */
.kb-toc{display:none;}
.kb-toc__label{
  margin:0 0 16px;font-family:var(--font-latin);font-size:10px;
  letter-spacing:.32em;color:var(--muted-2);text-transform:uppercase;
}
.kb-toc nav{display:flex;flex-direction:column;gap:2px;border-left:1px solid var(--hair-soft);}
.kb-toc a{
  position:relative;display:block;padding:7px 0 7px 16px;
  font-size:12.5px;line-height:1.6;color:var(--muted-2);
  transition:color .25s var(--ease);
}
.kb-toc a::before{
  content:"";position:absolute;left:-1px;top:8px;bottom:8px;width:1px;
  background:var(--gold);opacity:0;transition:opacity .25s var(--ease);
}
.kb-toc a:hover{color:var(--pearl);}
.kb-toc a.is-active{color:var(--gold-lt);}
.kb-toc a.is-active::before{opacity:1;}
.kb-toc a[data-depth="3"]{padding-left:28px;font-size:12px;color:rgba(244,239,226,.34);}

/* 移动端目录 */
.kb-toc-mobile{
  margin:0 0 34px;border:1px solid var(--hair-soft);border-radius:12px;
  background:rgba(7,14,34,.6);overflow:hidden;
}
.kb-toc-mobile summary{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 18px;cursor:pointer;list-style:none;
  font-size:13px;letter-spacing:.08em;color:rgba(244,239,226,.8);
}
.kb-toc-mobile summary::-webkit-details-marker{display:none;}
.kb-toc-mobile summary::after{
  content:"";width:8px;height:8px;border-right:1px solid var(--gold);
  border-bottom:1px solid var(--gold);transform:rotate(45deg);transition:transform .3s var(--ease);
}
.kb-toc-mobile[open] summary::after{transform:rotate(-135deg);}
.kb-toc-mobile nav{display:flex;flex-direction:column;padding:4px 0 12px;border-top:1px solid var(--hair-soft);}
.kb-toc-mobile a{padding:9px 18px;font-size:13px;color:var(--muted);}
.kb-toc-mobile a[data-depth="3"]{padding-left:32px;font-size:12.5px;color:var(--muted-2);}

/* ---------- 正文排版 ---------- */
.kb-body{font-size:16.5px;line-height:1.95;color:rgba(244,239,226,.8);}
.kb-body > *:first-child{margin-top:0;}
.kb-body p{margin:0 0 1.15em;}
.kb-body b,.kb-body strong{color:#FBF7EC;font-weight:700;}
.kb-body em{color:var(--gold-lt);font-style:normal;}
.kb-body del{color:var(--muted-2);}
.kb-body a{
  color:var(--gold-lt);
  border-bottom:1px solid rgba(246,196,83,.35);
  transition:border-color .25s var(--ease),color .25s var(--ease);
}
.kb-body a:hover{border-bottom-color:var(--gold);color:#FFF6D8;}

.kb-body h2{
  margin:2.1em 0 .75em;
  font-family:var(--font-display);font-weight:600;
  font-size:clamp(23px,2.3vw,30px);line-height:1.35;letter-spacing:.005em;
  color:#FBF7EC;
}
.kb-body h2::before{
  content:"";display:block;width:30px;height:2px;margin-bottom:16px;
  background:linear-gradient(90deg,var(--gold),rgba(246,196,83,0));
}
.kb-body h3{
  margin:1.8em 0 .6em;
  font-family:var(--font-ui);font-weight:700;
  font-size:19px;line-height:1.55;color:#F8F2E4;
}
.kb-body h4{
  margin:1.6em 0 .5em;font-size:16.5px;font-weight:700;color:var(--gold-lt);
  letter-spacing:.02em;
}
.kb-body h5,.kb-body h6{
  margin:1.4em 0 .4em;font-size:14px;font-weight:700;
  letter-spacing:.08em;color:var(--muted);text-transform:uppercase;
}

.kb-body ul,.kb-body ol{margin:0 0 1.25em;padding-left:1.45em;}
.kb-body li{margin:.42em 0;padding-left:.25em;}
.kb-body li::marker{color:rgba(246,196,83,.7);}
.kb-body li > ul,.kb-body li > ol{margin:.35em 0 .2em;}

.kb-body blockquote{
  margin:1.8em 0;padding:4px 0 4px 22px;
  border-left:2px solid rgba(246,196,83,.5);
  color:rgba(244,239,226,.66);
  font-family:var(--font-display);font-size:16.5px;line-height:1.9;
}
.kb-body blockquote p:last-child{margin-bottom:0;}

.kb-body hr{
  height:1px;border:0;margin:2.6em 0;
  background:linear-gradient(90deg,transparent,rgba(233,214,164,.26) 22%,rgba(233,214,164,.26) 78%,transparent);
}

/* 行内代码 / 代码块 */
.kb-body code{
  font-family:var(--font-mono);font-size:.88em;
  padding:.14em .42em;border-radius:5px;
  background:rgba(246,196,83,.08);
  border:1px solid rgba(246,196,83,.14);
  color:#FFE6AE;word-break:break-word;
}
.kb-body pre{
  margin:1.6em 0;padding:20px 22px;
  background:var(--ink-2);border:1px solid var(--hair-soft);border-radius:12px;
  overflow:auto;line-height:1.75;
  font-family:var(--font-mono);font-size:13px;color:#E8E1D0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}
.kb-body pre code{padding:0;background:none;border:0;color:inherit;font-size:inherit;}

/* 图片 */
.kb-body img{
  max-width:100%;height:auto;margin:1.9em auto;
  border-radius:10px;border:1px solid rgba(233,214,164,.18);
  background:rgba(255,255,255,.02);
  box-shadow:0 18px 44px -24px rgba(0,0,0,.9);
  cursor:zoom-in;
}
.kb-body p > img:only-child{margin:1.9em auto;}
.kb-body figure{margin:1.9em 0;}
.kb-body figure img{margin:0 auto;}
.kb-body figcaption{
  margin-top:10px;text-align:center;font-size:12px;letter-spacing:.04em;color:var(--muted-2);
}
.kb-fig-tall img{max-height:78vh;object-fit:contain;width:auto;}

/* 表格 */
.kb-table{
  margin:1.9em 0;border:1px solid var(--hair-soft);border-radius:12px;
  background:rgba(7,14,34,.55);overflow:auto;
}
.kb-table table{
  width:100%;border-collapse:collapse;min-width:520px;
  font-size:13.5px;line-height:1.7;
}
.kb-table th{
  padding:13px 16px;text-align:left;vertical-align:top;
  font-weight:700;font-size:12px;letter-spacing:.1em;color:var(--gold-lt);
  text-transform:uppercase;white-space:nowrap;
  background:rgba(246,196,83,.06);
  border-bottom:1px solid rgba(246,196,83,.2);
}
.kb-table td{
  padding:12px 16px;vertical-align:top;color:rgba(244,239,226,.76);
  border-bottom:1px solid rgba(233,214,164,.08);
}
.kb-table tr:last-child td{border-bottom:0;}
.kb-table tbody tr:hover td{background:rgba(246,196,83,.03);}
.kb-table td p,.kb-table th p{margin:0;}
.kb-table td p + p{margin-top:.5em;}

/* 提示块 */
.kb-note{
  display:flex;gap:14px;margin:1.9em 0;padding:18px 20px;
  border:1px solid rgba(246,196,83,.18);border-left:2px solid var(--gold);
  border-radius:0 12px 12px 0;
  background:linear-gradient(90deg,rgba(246,196,83,.07),rgba(246,196,83,.02));
}
.kb-note__emoji{
  flex:none;width:26px;height:26px;display:grid;place-items:center;
  font-size:15px;line-height:1;
  border-radius:50%;background:rgba(246,196,83,.12);
}
.kb-note__body{min-width:0;font-size:15px;line-height:1.85;color:rgba(244,239,226,.78);}
.kb-note__body p:last-child{margin-bottom:0;}
.kb-note__body h3{margin-top:0;font-size:16px;}

/* 提示词块：右上角一键复制（按钮由 kb.js 注入，只出现在长模板块上） */
.kb-note--prompt{align-items:flex-start;}
.kb-copy{
  flex:none;display:inline-flex;align-items:center;gap:6px;
  height:28px;padding:0 11px;
  border:1px solid rgba(246,196,83,.26);border-radius:999px;
  background:rgba(246,196,83,.06);
  color:rgba(246,196,83,.88);
  font-family:var(--font-ui);font-size:11.5px;font-weight:400;
  letter-spacing:.08em;line-height:1;white-space:nowrap;cursor:pointer;
  transition:color .25s var(--ease),border-color .25s var(--ease),background .25s var(--ease);
}
.kb-copy svg{
  flex:none;width:12px;height:12px;fill:none;stroke:currentColor;
  stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;
}
.kb-copy__done{display:none;}
.kb-copy:hover{border-color:rgba(246,196,83,.55);background:rgba(246,196,83,.13);color:var(--gold-lt);}
.kb-copy.is-copied{color:#8FE3B0;border-color:rgba(143,227,176,.42);background:rgba(143,227,176,.08);}
.kb-copy.is-copied .kb-copy__icon{display:none;}
.kb-copy.is-copied .kb-copy__done{display:block;}
.kb-copy.is-error{color:#FFA38F;border-color:rgba(255,163,143,.42);background:rgba(255,163,143,.08);}

/* 标题区第二入口：与主按钮同高同圆角，用发丝描边降一级，避免「文字链接」感 */
.kb-cta-row--pair{align-items:center;}
.kb-cta--quiet{
  -webkit-appearance:none;appearance:none;
  border-color:var(--hair);
  background:rgba(233,214,164,.02);
  color:rgba(244,239,226,.82);
  font-family:var(--font-ui);
  cursor:pointer;
}
.kb-cta--quiet:hover{
  border-color:rgba(246,196,83,.5);
  background:rgba(246,196,83,.06);
  color:var(--gold-lt);
}
.kb-cta__icon{
  flex:none;width:14px;height:14px;
  fill:none;stroke:currentColor;stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round;
}
.kb-cta__icon--copy{color:rgba(246,196,83,.82);}
.kb-cta--quiet:hover .kb-cta__icon--copy{color:var(--gold-lt);}
.kb-cta__icon--done{display:none;}
.kb-cta--quiet.is-copied{color:#8FE3B0;border-color:rgba(143,227,176,.38);background:rgba(143,227,176,.07);}
.kb-cta--quiet.is-copied .kb-cta__icon--copy{display:none;}
.kb-cta--quiet.is-copied .kb-cta__icon--done{display:block;}
.kb-cta--quiet.is-error{color:#FFA38F;border-color:rgba(255,163,143,.42);background:rgba(255,163,143,.07);}

/* 两种使用方式：两条并列入口，用金线分隔，不做卡片堆叠 */
.kb-mode{
  margin:2.5em 0 2.4em;padding-top:26px;
  border-top:1px solid var(--hair-soft);
}
.kb-mode__kicker{
  margin:0 0 10px;
  font-family:var(--font-latin);font-size:10.5px;letter-spacing:.18em;
  color:rgba(246,196,83,.72);text-transform:uppercase;
}
.kb-mode__kicker span{margin:0 2px;color:rgba(246,196,83,.38);}
.kb-mode > h3{margin:0 0 .7em;font-size:20px;}
.kb-mode > p{margin-bottom:1em;}
.kb-mode .kb-note{margin:1.2em 0 1.3em;}
.kb-mode .kb-cta-row{margin:20px 0 12px;}
.kb-mode__aside{
  margin:0 0 1em;font-size:12.5px;line-height:1.8;letter-spacing:.02em;
  color:rgba(244,239,226,.5);
}
.kb-mode__aside code{opacity:.86;}

/* 多栏卡片 */
.kb-grid{display:grid;gap:14px;margin:1.9em 0;grid-template-columns:repeat(var(--kb-cols,2),minmax(0,1fr));}
.kb-col{
  min-width:0;padding:18px;
  border:1px solid var(--hair-soft);border-radius:12px;background:rgba(7,14,34,.5);
}
.kb-col > *:last-child{margin-bottom:0;}
.kb-col .kb-note{margin:0;padding:0;border:0;background:none;}
.kb-col .kb-note__emoji{display:none;}
.kb-col img{margin:0 0 8px;}

/* 附件卡 */
.kb-file{
  display:flex;align-items:center;gap:16px;margin:1.9em 0;padding:16px 18px;
  border:1px solid var(--hair-soft);border-radius:12px;background:rgba(7,14,34,.55);
  transition:border-color .3s var(--ease),background .3s var(--ease);
}
.kb-file:hover{border-color:rgba(246,196,83,.35);background:rgba(246,196,83,.04);}
.kb-file__icon{
  flex:none;width:40px;height:40px;display:grid;place-items:center;
  border-radius:10px;border:1px solid rgba(246,196,83,.24);
  background:rgba(246,196,83,.08);
  font-family:var(--font-latin);font-size:9px;letter-spacing:.06em;color:var(--gold-lt);
}
.kb-file__body{min-width:0;flex:1;}
.kb-file__name{
  display:block;font-size:14px;font-weight:700;color:#FBF7EC;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.kb-file__meta{display:block;margin-top:3px;font-size:11.5px;color:var(--muted-2);letter-spacing:.06em;}
.kb-file__go{
  flex:none;display:inline-flex;align-items:center;gap:6px;
  font-size:11.5px;letter-spacing:.12em;color:var(--gold-lt);
}
.kb-file__go svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.6;}

/* 书签卡 */
.kb-bookmark{
  display:flex;align-items:center;gap:14px;margin:1.9em 0;padding:14px 18px;
  border:1px solid var(--hair-soft);border-left:2px solid rgba(246,196,83,.6);
  border-radius:0 12px 12px 0;background:rgba(246,196,83,.035);
  transition:border-color .3s var(--ease),background .3s var(--ease);
}
.kb-bookmark:hover{background:rgba(246,196,83,.07);}
.kb-bookmark__dot{width:8px;height:8px;border-radius:2px;background:var(--gold);transform:rotate(45deg);}
.kb-bookmark__body{min-width:0;}
.kb-bookmark__name{display:block;font-size:14px;font-weight:700;color:#FBF7EC;}
.kb-bookmark__url{display:block;font-size:11.5px;color:var(--muted-2);letter-spacing:.04em;margin-top:2px;}

/* 跳转 / 引用的独立页 */
.kb-doclink{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  margin:1.9em 0;padding:18px 20px;border:1px solid rgba(246,196,83,.24);border-radius:12px;
  background:linear-gradient(100deg,rgba(246,196,83,.1),rgba(246,196,83,.03));
}
.kb-doclink__body{min-width:0;}
.kb-doclink__label{display:block;font-size:10.5px;letter-spacing:.24em;color:rgba(246,196,83,.7);text-transform:uppercase;}
.kb-doclink__title{display:block;margin-top:6px;font-family:var(--font-display);font-size:18px;line-height:1.5;color:#FBF7EC;}
.kb-doclink__go{flex:none;font-size:12px;letter-spacing:.1em;color:var(--gold-lt);}

/* ---------- 文末 ---------- */
.kb-foot{
  max-width:780px;margin-top:74px;padding-top:30px;
  border-top:1px solid var(--hair-soft);
}
.kb-foot__nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.kb-foot__card{
  display:flex;flex-direction:column;gap:6px;padding:18px 20px;
  border:1px solid var(--hair-soft);border-radius:12px;background:rgba(7,14,34,.45);
  transition:border-color .3s var(--ease),transform .3s var(--ease),background .3s var(--ease);
}
.kb-foot__card:hover{border-color:rgba(246,196,83,.35);transform:translateY(-2px);background:rgba(246,196,83,.04);}
.kb-foot__card--next{text-align:right;align-items:flex-end;}
.kb-foot__dir{font-size:10.5px;letter-spacing:.2em;color:var(--muted-2);}
.kb-foot__title{font-family:var(--font-display);font-size:15.5px;line-height:1.5;color:#F7F1E3;}
.kb-foot__none{opacity:.35;pointer-events:none;}
.kb-foot__bottom{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;
  margin-top:26px;font-size:11.5px;letter-spacing:.08em;color:var(--muted-2);
}
.kb-foot__bottom a{color:var(--muted);transition:color .25s var(--ease);}
.kb-foot__bottom a:hover{color:var(--gold-lt);}

/* 页面快速跳转：回到顶部 / 回到底部
   形态：一枚竖向「黄铜细管」—— 半透明墨蓝玻璃芯 + 1px 金渐变描边（上亮下暖），
   两枚细金箭头上下分居，中线一道渐隐发丝；悬停时单侧亮起暖金光晕，
   到顶/到底时对应方向自动减淡（由 kb.js 加 .is-top / .is-bottom）。 */
.kb-jump{
  position:fixed;right:clamp(16px,3vw,40px);bottom:26px;z-index:60;
  display:flex;flex-direction:column;align-items:stretch;
  padding:3px;border-radius:999px;
  background:linear-gradient(180deg,rgba(15,25,52,.72) 0%,rgba(6,11,26,.86) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -1px 0 rgba(0,0,0,.42),
    0 18px 40px -24px rgba(0,0,0,.95),
    0 0 30px -18px rgba(246,196,83,.42);
  backdrop-filter:blur(12px) saturate(130%);
  -webkit-backdrop-filter:blur(12px) saturate(130%);
}
/* 金渐变描边：用遮罩只留 1px 边，比纯色 border 更像金属 */
.kb-jump::after{
  content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;
  background:linear-gradient(180deg,
    rgba(255,233,166,.52) 0%,
    rgba(233,214,164,.16) 42%,
    rgba(222,154,40,.42) 100%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask-composite:exclude;
  opacity:.85;pointer-events:none;
  transition:opacity .3s var(--ease);
}
.kb-jump:hover::after{opacity:1;}
.kb-jump__btn{
  position:relative;
  width:40px;height:40px;display:grid;place-items:center;padding:0;
  border:0;border-radius:999px;background:transparent;cursor:pointer;
  color:rgba(246,196,83,.8);
  transition:color .28s var(--ease),opacity .28s var(--ease),background .28s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
/* 两键之间的渐隐发丝分隔 */
.kb-jump__btn + .kb-jump__btn::before{
  content:"";position:absolute;top:-2px;left:50%;width:14px;height:1px;
  transform:translateX(-50%);
  background:linear-gradient(90deg,transparent,rgba(233,214,164,.28),transparent);
}
.kb-jump__btn svg{
  width:18px;height:18px;fill:none;stroke:currentColor;
  stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;
  transition:transform .35s var(--ease),filter .28s var(--ease);
}
.kb-jump__btn:hover{
  color:var(--gold-lt);
  background:radial-gradient(circle at 50% 50%,rgba(246,196,83,.20),rgba(246,196,83,.07) 62%,transparent 100%);
}
.kb-jump__btn:hover svg{filter:drop-shadow(0 0 9px rgba(246,196,83,.55));}
.kb-jump__btn:first-of-type:hover svg{transform:translateY(-1.5px);}
.kb-jump__btn:last-of-type:hover svg{transform:translateY(1.5px);}
.kb-jump__btn:active{background:rgba(246,196,83,.16);}
.kb-jump__btn:active svg{transform:none;}
/* 键盘聚焦：整枚细管亮一圈金，内部不画描边，避免与管壁打架 */
.kb-jump__btn:focus-visible{
  outline:none;color:var(--gold-lt);
  background:radial-gradient(circle at 50% 50%,rgba(246,196,83,.18),rgba(246,196,83,.05) 62%,transparent 100%);
}
.kb-jump:has(.kb-jump__btn:focus-visible){
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -1px 0 rgba(0,0,0,.42),
    0 0 0 2px rgba(246,196,83,.38),
    0 18px 40px -24px rgba(0,0,0,.95),
    0 0 30px -16px rgba(246,196,83,.5);
}
/* 不支持 :has() 的浏览器：按键内嵌一圈金线兜底 */
@supports not selector(:has(*)){
  .kb-jump__btn:focus-visible{outline:2px solid rgba(246,196,83,.6);outline-offset:-6px;}
}
/* 已到顶 / 已到底：对应方向减淡，提示「此路不通」 */
.kb-jump.is-top .kb-jump__btn:first-of-type,
.kb-jump.is-bottom .kb-jump__btn:last-of-type{opacity:.34;}
.kb-jump.is-top .kb-jump__btn:first-of-type:hover,
.kb-jump.is-bottom .kb-jump__btn:last-of-type:hover{opacity:1;}
/* 不支持遮罩合成的浏览器：退回一圈纯色发丝边 */
@supports not ((mask-composite:exclude) or (-webkit-mask-composite:xor)){
  .kb-jump{border:1px solid rgba(233,214,164,.22);}
  .kb-jump::after{display:none;}
}
@media (max-width:640px){
  .kb-jump{right:14px;bottom:18px;padding:2px;}
  .kb-jump__btn{width:38px;height:38px;}
  .kb-jump__btn svg{width:17px;height:17px;}
}
@media (prefers-reduced-motion:reduce){
  .kb-jump__btn,.kb-jump__btn svg,.kb-jump::after{transition:none;}
}

/* ---------- 图片放大 ---------- */
.kb-lightbox{
  position:fixed;inset:0;z-index:120;display:none;place-items:center;
  background:rgba(3,6,16,.94);backdrop-filter:blur(6px);padding:4vw;
}
.kb-lightbox.is-on{display:grid;}
.kb-lightbox img{
  max-width:100%;max-height:92vh;width:auto;height:auto;
  border-radius:8px;border:1px solid rgba(233,214,164,.2);
  box-shadow:0 40px 120px -40px #000;cursor:zoom-out;
}
.kb-lightbox__close{
  position:absolute;top:22px;right:22px;width:40px;height:40px;
  display:grid;place-items:center;border-radius:50%;
  border:1px solid rgba(233,214,164,.24);background:rgba(7,14,34,.7);color:var(--pearl);
}
.kb-lightbox__close svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;}

/* ============================================================
   知识库总览
   ============================================================ */
.kb-lib{max-width:var(--max);margin:0 auto;padding:0 var(--pad-x);}
.kb-lib__hero{
  position:relative;padding:calc(var(--nav-h) + 88px) 0 64px;
  border-bottom:1px solid var(--hair-soft);
}
.kb-lib__hero::before{
  content:"";position:absolute;inset:-120px -20vw auto;height:640px;z-index:-1;
  background:
    radial-gradient(620px 320px at 24% 8%, rgba(246,196,83,.13), transparent 70%),
    radial-gradient(520px 260px at 84% 0%, rgba(96,140,255,.08), transparent 72%);
}
.kb-lib__eyebrow{
  display:flex;align-items:center;gap:14px;margin:0 0 28px;
  font-family:var(--font-latin);font-size:11px;letter-spacing:.32em;color:rgba(246,196,83,.8);
}
.kb-lib__eyebrow::before{
  content:"";width:34px;height:1px;background:linear-gradient(90deg,var(--gold),transparent);
}
.kb-lib__title{
  margin:0 0 24px;max-width:16em;
  font-family:var(--font-display);font-weight:600;
  font-size:clamp(36px,5.2vw,68px);line-height:1.1;letter-spacing:-.015em;
}
.kb-lib__title em{font-style:normal;color:var(--gold-lt);}
.kb-lib__lead{max-width:620px;margin:0;font-size:16px;line-height:1.95;color:rgba(244,239,226,.66);}
.kb-lib__stats{display:flex;flex-wrap:wrap;gap:34px 52px;margin-top:44px;}
.kb-stat{display:flex;flex-direction:column;gap:6px;}
.kb-stat__num{
  font-family:var(--font-display);font-size:32px;line-height:1;color:var(--gold-lt);
  letter-spacing:.02em;
}
.kb-stat__label{font-size:11px;letter-spacing:.18em;color:var(--muted-2);}

.kb-lib__body{padding:20px 0 120px;}
.kb-lib__nav{
  position:sticky;top:var(--nav-h);z-index:20;
  display:flex;gap:8px;overflow-x:auto;padding:16px 0;
  background:var(--ink);
  border-bottom:1px solid var(--hair-soft);
  scrollbar-width:none;
  -webkit-mask-image:linear-gradient(90deg,#000 0,#000 93%,transparent 100%);
  mask-image:linear-gradient(90deg,#000 0,#000 93%,transparent 100%);
}
.kb-lib__nav::-webkit-scrollbar{display:none;}
.kb-lib__nav a{
  flex:none;display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 14px;
  border:1px solid var(--hair-soft);border-radius:999px;
  font-size:12px;letter-spacing:.04em;color:var(--muted);
  transition:border-color .3s var(--ease),color .3s var(--ease),background .3s var(--ease);
}
.kb-lib__nav a:hover,.kb-lib__nav a.is-active{
  border-color:rgba(246,196,83,.4);color:var(--gold-lt);background:rgba(246,196,83,.05);
}
.kb-lib__nav i{font-style:normal;font-family:var(--font-latin);font-size:10px;color:rgba(246,196,83,.62);}

.kb-mod{padding:64px 0 8px;scroll-margin-top:calc(var(--nav-h) + 40px);}
.kb-mod__head{
  display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px;
  padding-bottom:22px;border-bottom:1px solid var(--hair-soft);
}
.kb-mod__meta{display:flex;align-items:center;gap:14px;font-family:var(--font-latin);font-size:11px;letter-spacing:.28em;color:rgba(246,196,83,.7);}
.kb-mod__meta i{font-style:normal;color:rgba(233,214,164,.36);}
.kb-mod__title{width:100%;margin:14px 0 0;font-family:var(--font-display);font-weight:600;font-size:clamp(26px,3vw,38px);line-height:1.25;}
.kb-mod__lead{max-width:560px;margin:12px 0 0;font-size:13.5px;line-height:1.8;color:var(--muted-2);}
.kb-mod__count{font-family:var(--font-latin);font-size:12px;letter-spacing:.18em;color:var(--muted-2);padding-bottom:4px;}
.kb-mod__grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;
  margin-top:1px;background:var(--hair-soft);
  border:1px solid var(--hair-soft);border-top:0;
}
.kb-card{
  position:relative;display:flex;flex-direction:column;gap:12px;
  padding:26px 28px 24px;background:var(--ink);
  transition:background .35s var(--ease);
}
.kb-card:hover{background:rgba(246,196,83,.035);}
.kb-card__top{display:flex;align-items:center;gap:12px;}
.kb-card__idx{font-family:var(--font-latin);font-size:11px;letter-spacing:.1em;color:rgba(233,214,164,.4);}
.kb-card__tag{
  font-size:10.5px;letter-spacing:.16em;color:rgba(246,196,83,.82);
  padding:3px 8px;border:1px solid rgba(246,196,83,.22);border-radius:4px;
}
.kb-card__title{
  margin:0;font-family:var(--font-display);font-weight:600;
  font-size:clamp(17px,1.5vw,20px);line-height:1.55;color:#F7F1E3;
  transition:color .3s var(--ease);
}
.kb-card:hover .kb-card__title{color:var(--gold-lt);}
.kb-card__summary{margin:0;font-size:13px;line-height:1.85;color:var(--muted-2);}
.kb-card__foot{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin-top:auto;padding-top:14px;border-top:1px solid rgba(233,214,164,.07);
  font-size:11px;letter-spacing:.1em;color:rgba(244,239,226,.34);
}
.kb-card__go{display:inline-flex;align-items:center;gap:7px;color:rgba(246,196,83,.66);}
.kb-card__go svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:1.6;transition:transform .3s var(--ease);}
.kb-card:hover .kb-card__go svg{transform:translateX(3px);}
.kb-card__flag{
  position:absolute;top:0;left:0;width:2px;height:0;background:var(--gold);
  transition:height .35s var(--ease);
}
.kb-card:hover .kb-card__flag{height:100%;}

.kb-lib__foot{
  margin-top:80px;padding-top:32px;border-top:1px solid var(--hair-soft);
  display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;
  font-size:11.5px;letter-spacing:.08em;color:var(--muted-2);
}

/* ============================================================
   响应式
   ============================================================ */
@media (min-width:1100px){
  .kb-layout{grid-template-columns:228px minmax(0,1fr);gap:60px;}
  /* 试读解锁面板与正文同列，落在目录右侧，而不是跑到目录下面 */
  .kb-layout:not(.kb-layout--plain) > .kb-gate{grid-column:2;}
  .kb-toc{
    display:block;position:sticky;top:calc(var(--nav-h) + 40px);align-self:start;
    max-height:calc(100vh - var(--nav-h) - 84px);
    overflow-y:auto;overscroll-behavior:contain;
    scrollbar-width:thin;scrollbar-color:rgba(233,214,164,.18) transparent;
    padding-right:6px;
  }
  .kb-toc::-webkit-scrollbar{width:3px;}
  .kb-toc::-webkit-scrollbar-thumb{background:rgba(233,214,164,.18);border-radius:3px;}
  .kb-toc-mobile{display:none;}
}
@media (max-width:1099px){
  .kb-head{max-width:none;}
}
@media (max-width:820px){
  .kb-nav__all span{display:none;}
  .kb-nav__all{width:36px;padding:0;justify-content:center;}
  .kb-main{padding-top:calc(var(--nav-h) + 40px);padding-bottom:80px;}
  .kb-title{font-size:clamp(28px,7.4vw,38px);}
  .kb-layout{margin-top:34px;}
  .kb-body{font-size:15.5px;line-height:1.92;}
  .kb-body h2{font-size:22px;}
  .kb-body h3{font-size:17.5px;}
  .kb-foot__nav{grid-template-columns:1fr;}
  .kb-foot__card--next{text-align:left;align-items:flex-start;}
  .kb-mod__grid{grid-template-columns:1fr;}
  .kb-lib__hero{padding-top:calc(var(--nav-h) + 56px);}
  .kb-grid{grid-template-columns:1fr;}
  /* 附件卡：图标 + 文件名一行，下载入口单独一行，避免窄屏挤成细条 */
  .kb-file{
    display:grid;grid-template-columns:40px minmax(0,1fr);
    gap:4px 14px;align-items:center;
  }
  .kb-file__icon{grid-column:1;grid-row:1 / span 2;}
  .kb-file__body{grid-column:2;grid-row:1;}
  .kb-file__go{grid-column:2;grid-row:2;margin-left:0;justify-self:start;}
}
@media (max-width:560px){
  .kb-body{font-size:15px;}
  .kb-meta{gap:8px 12px;font-size:11px;}
  .kb-card{padding:22px 20px;}
  .kb-table table{min-width:440px;font-size:12.5px;}
  .kb-table th,.kb-table td{padding:10px 12px;}
  .kb-note{padding:15px 16px;gap:11px;}
  /* 窄屏：图标与复制按钮并排占卡片顶部一行，正文用满宽度，不被按钮挤窄 */
  .kb-note--prompt{position:relative;display:block;padding-top:52px;}
  .kb-note--prompt .kb-note__emoji{position:absolute;top:15px;left:16px;}
  .kb-note--prompt .kb-copy{position:absolute;top:15px;right:16px;}
  .kb-copy{height:26px;gap:5px;padding:0 9px;font-size:11px;}
  .kb-file__name{white-space:normal;}
  .kb-doclink{flex-direction:column;align-items:flex-start;gap:10px;}
  .kb-cta-row--pair{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
  .kb-cta-row--pair .kb-cta{min-width:0;padding:0 12px;justify-content:center;}
  .kb-mode{margin:2em 0 2.1em;padding-top:22px;}
  .kb-mode .kb-cta-row{margin-top:16px;}
  .kb-mode__aside{font-size:12px;}
}

@media (max-width:380px){
  .kb-cta-row--pair{grid-template-columns:1fr;}
}

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

/* ============================================================
   工具页（GitHub 监控器 / 财务表）
   ============================================================ */
.kb-layout--plain{grid-template-columns:minmax(0,1fr);}
.kb-body--wide{max-width:none;}
.kb-muted{color:var(--muted-2);font-size:13.5px;line-height:1.9;}

.kb-tool{margin-top:8px;}
.kb-tool__bar{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;
  padding:16px 18px;border:1px solid var(--hair-soft);border-radius:14px;
  background:rgba(7,14,34,.55);
}
.kb-search{
  flex:1 1 280px;display:flex;align-items:center;gap:9px;
  height:40px;padding:0 14px;border:1px solid var(--hair-soft);border-radius:10px;
  background:rgba(5,10,28,.7);transition:border-color .25s var(--ease);
}
.kb-search:focus-within{border-color:rgba(246,196,83,.45);}
.kb-search svg{flex:none;width:14px;height:14px;fill:none;stroke:var(--muted-2);stroke-width:1.5;}
.kb-search input{
  flex:1;min-width:0;height:100%;border:0;background:none;outline:none;
  color:var(--pearl);font-size:13px;font-family:inherit;
}
.kb-search input::placeholder{color:rgba(244,239,226,.34);}
.kb-select,.kb-check{
  display:inline-flex;align-items:center;gap:8px;
  font-size:12px;color:var(--muted-2);letter-spacing:.04em;white-space:nowrap;
}
.kb-select select{
  height:40px;padding:0 30px 0 12px;border-radius:10px;
  border:1px solid var(--hair-soft);background:rgba(5,10,28,.7);
  color:var(--pearl);font-family:inherit;font-size:12.5px;
  appearance:none;-webkit-appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,var(--gold) 50%),linear-gradient(135deg,var(--gold) 50%,transparent 50%);
  background-position:calc(100% - 16px) 17px,calc(100% - 11px) 17px;
  background-size:5px 5px,5px 5px;background-repeat:no-repeat;
}
.kb-select select:focus{outline:1px solid rgba(246,196,83,.5);outline-offset:2px;}
.kb-check input{
  width:15px;height:15px;accent-color:#F6C453;cursor:pointer;
}
.kb-check span{cursor:pointer;}
.kb-tool__count{
  margin:18px 0 14px;font-size:12px;letter-spacing:.06em;color:var(--muted-2);
}
.kb-tool__count b{color:var(--gold-lt);font-size:14px;font-family:var(--font-latin);}
.kb-tool__empty{color:var(--muted-2);font-size:13.5px;padding:30px 0;}

.kb-table--repo{margin-top:0;}
.kb-table--repo table{min-width:820px;}
.kb-table--repo th:first-child,.kb-table--repo td:first-child{padding-left:18px;}
.kb-table--repo tbody tr{transition:background .2s var(--ease);}
.kb-repo-cell{display:flex;gap:14px;min-width:320px;max-width:520px;}
.kb-repo-idx{
  flex:none;font-family:var(--font-latin);font-size:10.5px;color:rgba(233,214,164,.32);
  padding-top:4px;letter-spacing:.06em;
}
.kb-repo-main{min-width:0;}
.kb-repo{
  display:inline-block;font-size:14px;font-weight:700;color:#FBF7EC;
  border-bottom:1px solid transparent;
}
.kb-repo:hover{color:var(--gold-lt);border-bottom-color:rgba(246,196,83,.4);}
.kb-repo-desc{
  display:block;margin-top:5px;font-size:12.5px;line-height:1.75;color:var(--muted-2);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.kb-repo-meta{display:block;margin-top:5px;font-size:10.5px;letter-spacing:.06em;color:rgba(244,239,226,.3);}
.kb-domain{font-size:12px;color:rgba(244,239,226,.6);white-space:nowrap;}
.kb-scene{
  display:inline-block;font-size:11.5px;line-height:1.65;color:rgba(246,196,83,.86);
  padding:3px 9px;border-radius:6px;background:rgba(246,196,83,.07);
  border:1px solid rgba(246,196,83,.16);max-width:240px;
}
.kb-scene--none{color:rgba(244,239,226,.24);background:none;border-color:transparent;}
.kb-num{font-family:var(--font-latin);font-size:13px;color:rgba(244,239,226,.82);white-space:nowrap;}
.kb-date{font-family:var(--font-latin);font-size:11.5px;color:var(--muted-2);white-space:nowrap;}

/* ---------- 操作步骤（财务表） ---------- */
.kb-steps{list-style:none;margin:1.6em 0 2.2em;padding:0;counter-reset:step;}
.kb-steps li{
  counter-increment:step;position:relative;
  padding:0 0 26px 46px;margin:0;
}
.kb-steps li::before{
  content:counter(step,decimal-leading-zero);
  position:absolute;left:0;top:1px;
  width:28px;height:28px;display:grid;place-items:center;
  border-radius:50%;border:1px solid rgba(246,196,83,.3);
  font-family:var(--font-latin);font-size:10.5px;color:var(--gold-lt);
  background:rgba(246,196,83,.06);
}
.kb-steps li::after{
  content:"";position:absolute;left:14px;top:34px;bottom:6px;width:1px;
  background:linear-gradient(180deg,rgba(246,196,83,.24),rgba(233,214,164,.06));
}
.kb-steps li:last-child{padding-bottom:0;}
.kb-steps li:last-child::after{display:none;}
.kb-steps li > p{margin:0 0 12px;font-size:14.5px;color:rgba(244,239,226,.82);}
.kb-steps img{
  margin:0;max-width:100%;border-radius:10px;
  border:1px solid rgba(233,214,164,.18);
  box-shadow:0 16px 40px -26px rgba(0,0,0,.9);
  cursor:zoom-in;
}

/* ---------- 思维笔记 ---------- */
.kb-mindmap{margin-top:26px;}
.kb-mind__intro{margin-bottom:8px;}
.kb-mind__root{
  position:relative;margin:0 0 18px;padding:24px 26px 6px;
  border:1px solid var(--hair-soft);border-radius:16px;
  background:
    radial-gradient(420px 160px at 0% 0%, rgba(246,196,83,.07), transparent 70%),
    rgba(7,14,34,.5);
}
.kb-mind__root > h2{
  margin:0 0 14px;padding:0;
  font-family:var(--font-display);font-size:24px;line-height:1.4;color:#FBF7EC;
}
.kb-mind__root > h2::before{display:none;}
.kb-mind{list-style:none;margin:0;padding:0 0 0 20px;border-left:1px solid rgba(233,214,164,.14);}
.kb-mind li{
  position:relative;margin:0;padding:5px 0 5px 16px;
  font-size:14px;line-height:1.85;color:rgba(244,239,226,.78);
}
.kb-mind li::before{
  content:"";position:absolute;left:-20px;top:16px;width:14px;height:1px;
  background:rgba(233,214,164,.22);
}
.kb-mind li::marker{content:none;}
.kb-mind--d2 > li{font-size:13.5px;color:rgba(244,239,226,.7);}
.kb-mind--d3 > li,
.kb-mind--d4 > li{font-size:12.8px;color:rgba(244,239,226,.56);}
.kb-mind ul{margin-top:2px;}
.kb-mind ul li::before{background:rgba(233,214,164,.14);}

/* ---------- 其他 ---------- */
.kb-card--empty{pointer-events:none;grid-column:1 / -1;}
.kb-card--empty .kb-card__title{color:rgba(244,239,226,.5);}
.kb-card--empty .kb-card__summary{color:rgba(244,239,226,.3);}
.kb-figure{margin:1.9em 0;}

@media (max-width:820px){
  .kb-tool__bar{padding:14px;}
  .kb-select,.kb-check{flex:1 1 auto;}
  .kb-select select{width:100%;}
  .kb-steps li{padding-left:40px;}
  .kb-mind__root{padding:20px 18px 4px;}
}

/* 视频演示 */
.kb-video{margin:1.9em 0;}
.kb-video video{
  width:100%;height:auto;display:block;border-radius:12px;
  border:1px solid rgba(233,214,164,.18);background:#000;
  box-shadow:0 18px 44px -24px rgba(0,0,0,.9);
}

/* 视频高度上限，避免竖屏素材占满整屏 */
.kb-video video{max-height:76vh;object-fit:contain;background:#000;}

@media (max-width:560px){
  .kb-meta__dot{display:none;}
  .kb-meta{gap:6px 14px;}
}

/* 目录底部渐隐，提示还有更多条目 */
@media (min-width:1100px){
  .kb-toc{
    -webkit-mask-image:linear-gradient(180deg,#000 0,#000 calc(100% - 22px),transparent 100%);
    mask-image:linear-gradient(180deg,#000 0,#000 calc(100% - 22px),transparent 100%);
  }
}

/* ---------- 媒体表格 → 卡片画廊（Seedance 案例表等） ---------- */
.kb-table--gallery{background:none;border:0;border-radius:0;overflow:visible;}
.kb-table--gallery table{display:block;min-width:0;width:100%;}
.kb-table--gallery thead{display:none;}
.kb-table--gallery tbody{display:grid;gap:16px;}
.kb-table--gallery tr{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:10px;padding:18px;
  border:1px solid var(--hair-soft);border-radius:12px;
  background:rgba(7,14,34,.5);
}
.kb-table--gallery tr:hover td{background:none;}
.kb-table--gallery td{
  display:block;padding:0;border:0;min-width:0;
  font-size:13px;line-height:1.75;color:rgba(244,239,226,.7);
}
.kb-table--gallery td:empty{display:none;}
.kb-table--gallery td > p:only-child{margin:0;}
.kb-table--gallery td:first-child{
  grid-column:1 / -1;padding:0 0 12px;margin-bottom:2px;
  border-bottom:1px solid rgba(233,214,164,.1);
  color:rgba(244,239,226,.82);
}
.kb-table--gallery td:first-child b{color:var(--gold-lt);font-size:12px;letter-spacing:.1em;}
.kb-table--gallery img,
.kb-table--gallery video{
  margin:0;width:100%;height:auto;border-radius:8px;
}
.kb-table--gallery figure{margin:0;}
.kb-table--gallery video{aspect-ratio:16/9;object-fit:cover;background:#000;}
.kb-table--gallery td p + p{margin-top:6px;font-size:12px;color:var(--muted-2);}

/* 画廊表格：文字格占两列，媒体格单列 */
.kb-table--gallery td.g-text{grid-column:span 2;}
.kb-table--gallery td.g-label{grid-column:1 / -1;}
.kb-table--gallery td.g-media{grid-column:span 1;}
.kb-table--gallery video{object-fit:contain;}
@media (max-width:560px){
  .kb-table--gallery td.g-text{grid-column:1 / -1;}
  .kb-table--gallery tr{grid-template-columns:repeat(auto-fit,minmax(120px,1fr));padding:14px;}
}

/* ============================================================
   会员试读
   ------------------------------------------------------------
   所有访客都能进入二级页；非会员只看到正文前段，
   附件下载与配套工具入口保持可见但不可用。
   遮罩 / 截断由 kb.js 依据正文实际高度计算，这里只管外观。
   ============================================================ */

/* 试读提示：放在标题区末尾，一条轻金描边，不抢正文 */
.kb-trial{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;
  margin:0 0 2px;padding:10px 16px;
  border-left:2px solid rgba(246,196,83,.68);
  background:linear-gradient(90deg,rgba(246,196,83,.09),rgba(246,196,83,0));
  font-size:12px;line-height:1.7;letter-spacing:.03em;color:rgba(244,239,226,.66);
}
.kb-trial b{
  font-weight:600;font-size:10.5px;letter-spacing:.2em;
  color:var(--gold-lt);text-transform:uppercase;
}
.kb-trial a{
  margin-left:auto;flex:none;
  color:var(--gold-lt);border-bottom:1px solid rgba(246,196,83,.4);
  transition:border-color .25s var(--ease),color .25s var(--ease);
}
.kb-trial a:hover{border-bottom-color:var(--gold-lt);color:#FFF6D8;}

/* 正文截断：底部渐隐，提示后面还有内容 */
.kb-body.is-gated,
.kb-body[data-server-trial="true"]{
  overflow:hidden;
  -webkit-mask-image:linear-gradient(180deg,#000 0,#000 calc(100% - 180px),transparent 100%);
          mask-image:linear-gradient(180deg,#000 0,#000 calc(100% - 180px),transparent 100%);
}
/* .kb-file / .kb-table 等自带 display，原生 [hidden] 会被覆盖，这里强制生效 */
.kb-body [hidden]{display:none !important;}

/* 工具类条目：预览可看，筛选与表格不可操作 */
.kb-tool.is-gated{cursor:not-allowed;}

/* 解锁面板：不做卡片，和文章同一套「档案页」语言 */
.kb-gate{
  position:relative;max-width:780px;
  margin-top:30px;padding:40px 0 8px;
  border-top:1px solid var(--hair);
}
.kb-gate::before{
  content:"";position:absolute;left:0;top:-1px;width:86px;height:1px;
  background:linear-gradient(90deg,var(--gold),rgba(246,196,83,0));
  box-shadow:0 0 18px rgba(246,196,83,.55);
}
.kb-gate__eyebrow{
  margin:0 0 14px;
  font-family:var(--font-latin);font-size:10px;letter-spacing:.34em;
  color:rgba(246,196,83,.72);
}
.kb-gate__title{
  margin:0 0 16px;
  font-family:var(--font-display);font-weight:600;
  font-size:clamp(26px,3vw,36px);line-height:1.32;letter-spacing:-.005em;
  color:#FBF7EC;
}
.kb-gate__title em{font-style:normal;color:var(--gold-lt);}
.kb-gate__lead{
  margin:0 0 28px;max-width:620px;
  font-size:14.5px;line-height:1.95;color:rgba(244,239,226,.64);
}
.kb-gate__list{
  list-style:none;margin:0 0 30px;padding:0;
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 28px;
}
.kb-gate__list li{
  display:flex;gap:11px;padding:13px 0;
  border-top:1px solid var(--hair-soft);
  font-size:12.5px;line-height:1.75;color:rgba(244,239,226,.72);
}
.kb-gate__list span{
  flex:none;padding-top:2px;
  font-family:var(--font-latin);font-size:10px;letter-spacing:.08em;
  color:rgba(246,196,83,.66);
}
.kb-gate__actions{display:flex;flex-wrap:wrap;align-items:center;gap:14px 22px;}
.kb-gate__cta{
  display:inline-flex;align-items:center;gap:10px;
  height:46px;padding:0 26px;border:0;border-radius:8px;cursor:pointer;
  background:linear-gradient(180deg,#F8D074 0%,#F2BF50 46%,#E3A734 100%);
  color:#1B1304;font-family:inherit;font-size:13px;font-weight:700;letter-spacing:.04em;
  box-shadow:0 14px 30px -18px rgba(246,196,83,.65);
  transition:transform .3s var(--ease),box-shadow .3s var(--ease),filter .3s var(--ease);
}
.kb-gate__cta:hover{transform:translateY(-1px);filter:brightness(1.04);box-shadow:0 18px 34px -16px rgba(246,196,83,.7);}
.kb-gate__cta svg{
  width:13px;height:13px;flex:none;
  fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
.kb-gate__hint{font-size:11.5px;letter-spacing:.04em;color:var(--muted-2);}
.kb-gate__hint a{
  color:rgba(246,196,83,.86);
  border-bottom:1px solid rgba(246,196,83,.3);
  transition:color .25s var(--ease),border-color .25s var(--ease);
}
.kb-gate__hint a:hover{color:var(--gold-lt);border-bottom-color:rgba(246,196,83,.7);}

/* 面板被「下载 / 工具已锁定」点击唤起时，轻轻亮一下 */
@keyframes kbGatePulse{
  0%{box-shadow:0 0 0 0 rgba(246,196,83,0);}
  30%{box-shadow:0 0 0 1px rgba(246,196,83,.42),0 0 34px -8px rgba(246,196,83,.38);}
  100%{box-shadow:0 0 0 0 rgba(246,196,83,0);}
}
.kb-gate.is-pulse{animation:kbGatePulse .9s var(--ease) 1;}

/* 锁定态：附件卡与工具入口 */
.kb-vip-chip{
  flex:none;display:inline-flex;align-items:center;height:18px;padding:0 7px 1px;
  border:1px solid rgba(246,196,83,.34);border-radius:999px;
  background:rgba(246,196,83,.08);
  font-family:var(--font-latin);font-size:8.5px;letter-spacing:.14em;
  color:rgba(246,196,83,.86);
}
.kb-file.is-gated{
  cursor:not-allowed;
  border-color:rgba(233,214,164,.08);
  background:rgba(7,14,34,.34);
}
.kb-file.is-gated:hover{
  border-color:rgba(233,214,164,.1);
  background:rgba(7,14,34,.4);
}
.kb-file.is-gated .kb-file__icon{opacity:.5;}
.kb-file.is-gated .kb-file__name{color:rgba(251,247,236,.72);}
.kb-file.is-gated .kb-file__go{color:rgba(233,214,164,.5);gap:7px;}
.kb-cta.is-gated{
  cursor:not-allowed;
  border-color:rgba(233,214,164,.16);
  background:none;
  color:rgba(233,214,164,.52);
}
.kb-cta.is-gated:hover{
  transform:none;
  border-color:rgba(233,214,164,.18);
  background:rgba(233,214,164,.02);
}
.kb-cta.is-gated .kb-cta__arrow{opacity:.45;}

/* 目录里指向「未解锁章节」的条目：可读但不可跳 */
.kb-toc a.is-gated,
.kb-toc-mobile a.is-gated{color:rgba(244,239,226,.24);cursor:not-allowed;}
.kb-toc a.is-gated:hover,
.kb-toc-mobile a.is-gated:hover{color:rgba(244,239,226,.34);}
.kb-toc a.is-gated::after,
.kb-toc-mobile a.is-gated::after{
  content:"VIP";margin-left:6px;
  font-family:var(--font-latin);font-size:8px;letter-spacing:.1em;
  color:rgba(246,196,83,.5);
}

/* 轻提示 */
.kb-gate-toast{
  position:fixed;left:50%;bottom:36px;z-index:130;
  max-width:calc(100vw - 40px);
  padding:10px 18px;border-radius:999px;
  border:1px solid rgba(246,196,83,.26);
  background:rgba(7,14,34,.95);
  box-shadow:0 20px 44px -24px #000;
  font-size:12.5px;letter-spacing:.03em;color:rgba(244,239,226,.92);
  opacity:0;pointer-events:none;
  transform:translate(-50%,12px);
  transition:opacity .3s var(--ease),transform .3s var(--ease);
}
.kb-gate-toast.is-on{opacity:1;transform:translate(-50%,0);}

@media (max-width:900px){
  .kb-gate__list{grid-template-columns:1fr;gap:0;}
  .kb-gate__list li{padding:11px 0;}
  .kb-gate__actions{align-items:flex-start;}
}
@media (max-width:560px){
  .kb-trial{padding:9px 12px;font-size:11.5px;}
  .kb-trial a{margin-left:0;}
  .kb-gate{padding-top:30px;}
  .kb-gate__title{font-size:26px;}
  .kb-gate__cta{width:100%;justify-content:center;}
  .kb-gate__hint{width:100%;}
}

