/* 识见 Seek 帮助中心样式。
 *
 * 设计取向：**文档站**，不是营销页。用户是带着一个问题来的，目标是让他尽快读完并离开，
 * 所以克制装饰、放大留白、把导航做稳。品牌色沿用官网（tokens.css 由构建脚本从
 * src/style.css 的 :root 抽取生成，本文件不重复定义任何 token）。
 *
 * 断点与官网一致：1199 / 900 / 767。
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ---------------------------------------------------------------------------
 * 可读性覆盖：tokens.css 由构建脚本从 src/style.css 抽取，是全站共享的。
 * 但官网是营销页（大字、少量文字），帮助中心是**长文阅读界面**，对正文级的对比度
 * 有 WCAG AA 的要求，所以这里做两处最小覆盖（不改共享 token 本身）。
 *
 * 原值实测（对页面底 #f7f7f3）：
 *   --text-secondary #656b66 = 5.08:1  ✓ 达标
 *   --text-tertiary  #929792 = **2.77:1**  ✗ 不达标 —— 而它被用在面包屑、更新时间、
 *                                              卡片计数、侧栏分组名等 20+ 处**信息文本**上
 * 修法不是把 tertiary 调深一档：算下来要 ≥4.5:1 得用 #696f68，那和 secondary 几乎重合，
 * 层级会塌。所以把两级**同时下移**，各自都达标、彼此仍可区分。
 * --------------------------------------------------------------------------- */
:root {
  --text-secondary: #5a615c; /* 5.93:1 */
  --text-tertiary: #696f68;  /* 4.80:1 */
}

body {
  margin: 0;
  background: var(--bg, #f7f7f3);
  color: var(--text-primary, #202421);
  /* 拉丁字形交给系统字体（macOS 上是 SF Pro，字形比 PingFang 自带的更规整），
     汉字再回落到中文字体。数字与英文在帮助文档里很常见（版本号、时长、金额）。 */
  font-family: -apple-system, 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei',
    'Noto Sans SC', system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.8;
  /* 中文正文加一点字距：16.5px 下约 0.17px。不加的话汉字密排会显得拥挤，
     这也是「字体偏小」观感的一部分 —— 视觉体量不只来自字号，也来自留白。 */
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-dark, #4f6458);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 键盘焦点必须看得见（无替代方案的 outline:none 一律禁止） */
:focus-visible {
  outline: 2px solid var(--brand, #5f7668);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 锚点跳转不被吸顶导航遮住 */
[id] {
  scroll-margin-top: 84px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--brand, #5f7668);
  color: #fff;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------------- 顶部导航 ---------------- */

/* 两行结构：定位行（产品 › 帮助中心 › 搜索）+ 分类切换条。
   单行顶栏的问题是进到文档里就看不到「还有哪些分类」，而且跟官网长得几乎一样，
   看不出自己在帮助中心 —— 分类条同时承担导航与位置指示。 */
.help-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border, #e5e7e2);
  box-shadow: 0 1px 12px rgba(32, 36, 33, 0.04);
}

.help-nav__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 28px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--text-primary, #202421);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .ico-close,
.nav-toggle[aria-expanded='true'] .ico-menu {
  display: none;
}

.nav-toggle[aria-expanded='true'] .ico-close {
  display: block;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  color: var(--text-primary, #202421);
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-brand {
  font-size: 18px;
  letter-spacing: 0.3px;
}

/* 「产品 │ 栏目」：竖线是**平级栏目**之间的分隔符，不是层级符号 —— 帮助中心与场景指南
   是两个并列的栏目，用「›」会读成「帮助中心 > 场景指南」的从属关系。 */
.nav-path {
  width: 1px;
  height: 18px;
  background: var(--border, #e5e7e2);
}

.nav-sections {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-section {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-secondary, #656b66);
  white-space: nowrap;
  transition: color 160ms var(--ease-out, ease-out), background 160ms var(--ease-out, ease-out);
}

.nav-section:hover {
  color: var(--text-primary, #202421);
  background: var(--surface-secondary, #f0f1ec);
  text-decoration: none;
}

.nav-section.is-current {
  font-weight: 600;
  color: var(--text-primary, #202421);
}

.nav-section.is-current:hover {
  background: none;
}

.nav-search {
  position: relative;
  flex: 1;
  max-width: 460px;
  margin-left: auto;
  min-width: 0;
}

.nav-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-tertiary, #929792);
  pointer-events: none;
}

.nav-search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  border: 1.5px solid var(--border, #e5e7e2);
  border-radius: 11px;
  background: var(--surface-secondary, #f0f1ec);
  font-size: 15px;
  font-family: inherit;
  color: inherit;
  transition: border-color 160ms var(--ease-out, ease-out), background 160ms var(--ease-out, ease-out);
}

.nav-search input::placeholder {
  color: var(--text-tertiary, #929792);
}

.nav-search input:focus {
  border-color: var(--brand, #5f7668);
  background: var(--surface, #fff);
}

.nav-home {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 4px;
  font-size: 15px;
  color: var(--text-secondary, #656b66);
  white-space: nowrap;
}

/* ---------------- 首页背景带 ----------------
 * 参考图顶部中心最蓝（#c2d8fa）向外、向下渐白（#f4f5ff）。用径向渐变放在 body 上而不是
 * 全宽伪元素：`background-size: 100%` 按 body 的 padding box 解析，**不会引入横向滚动**
 * （100vw 在带经典滚动条的桌面浏览器上会多出滚动条宽度）。
 * 末段（77%→100%）从参考图的 #eff4ff 缓入页面底色 #f7f7f3 —— 参考图那边底色接近白，
 * 而我们的页面底是暖白，直接截断会留一条可见的横向接缝。
 */
body.page-home {
  background-color: var(--bg, #f7f7f3);
  /* 色标是按参考图逐点反推的（把「可见蓝带」与「参考图蓝带」对齐后分段采样）。
     去掉顶栏分类条后整套纵向节奏上移了 53px，色标随之重算，让同一颜色落在同一视觉位置。 */
  background-image: radial-gradient(115% 507px at 50% 0%,
      #b6d1f7 0%, #c1d7f9 13%, #cee1ff 28%, #d5e5ff 44%, #dfeaff 59%, #eff4ff 75%,
      #f4f6f8 85%, #f7f7f3 100%);
  background-repeat: no-repeat;
  background-size: 100% 507px;
}

/* ---------------- 三栏骨架 ---------------- */

.help-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 224px;
  gap: 44px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 92px 28px 80px;
}

.help-main {
  min-width: 0;
  max-width: 760px;
}

/* ---------------- 左侧目录 ---------------- */

.help-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  padding-right: 8px;
  font-size: 15px;
}

.side-title {
  margin: 0 0 14px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-tertiary, #929792);
  text-transform: uppercase;
}

.side-title a {
  color: inherit;
}

.side-tree,
.side-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-tree > li {
  margin-bottom: 4px;
}

.side-tree summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary, #202421);
  list-style: none;
}

.side-tree summary::-webkit-details-marker {
  display: none;
}

.side-tree summary:hover {
  background: var(--surface-secondary, #f0f1ec);
}

.side-tree summary a:hover {
  text-decoration: none;
}

.side-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary, #929792);
}

.side-tree ul {
  margin: 2px 0 10px 10px;
  padding-left: 10px;
  border-left: 1px solid var(--divider, #ecede9);
}

.side-tree ul a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-secondary, #656b66);
  line-height: 1.5;
}

.side-tree ul a:hover {
  background: var(--surface-secondary, #f0f1ec);
  color: var(--text-primary, #202421);
  text-decoration: none;
}

.side-tree ul a[aria-current='page'] {
  background: var(--brand-light, #e8eee9);
  color: var(--brand-dark, #4f6458);
  font-weight: 600;
}

.side-foot {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--divider, #ecede9);
  font-size: 13.5px;
  color: var(--text-tertiary, #929792);
}

/* ---------------- 右侧本页目录 ---------------- */

.help-toc {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  font-size: 14px;
  border-left: 1px solid var(--divider, #ecede9);
  padding-left: 16px;
}

.toc-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-tertiary, #929792);
}

.help-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-toc li {
  margin-bottom: 2px;
}

.help-toc a {
  display: block;
  padding: 5px 0;
  color: var(--text-secondary, #656b66);
  line-height: 1.5;
}

.help-toc a:hover,
.help-toc a.is-active {
  color: var(--brand-dark, #4f6458);
  text-decoration: none;
}

.help-toc .toc-l2 {
  padding-left: 12px;
}

.toc-mobile {
  display: none;
}

/* ---------------- 面包屑与标题 ---------------- */

/* 面包屑：去掉顶栏分类条后，它独自承担「我在哪、怎么回去」的职责，
   所以字重上来一档（16px，与正文同级），分隔符换成箭头（比「/」更像路径指引）。 */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.6;
}

.breadcrumb li:not(:last-child)::after {
  content: '→';
  margin-left: 8px;
  font-size: 14px;
  color: var(--text-tertiary, #696f68);
}

.breadcrumb a {
  color: var(--brand-dark, #4f6458);
}

.breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 当前项用与正文一致的深色，并加一点字重 —— 它是「你在这里」的落点 */
.breadcrumb [aria-current='page'] {
  color: var(--text-primary, #202421);
  font-weight: 600;
}

.help-article h1 {
  margin: 0 0 12px;
  font-size: 33px;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.doc-meta {
  margin: 0 0 32px;
  font-size: 13.5px;
  color: var(--text-tertiary, #929792);
}

.doc-meta__sep {
  margin: 0 6px;
}

/* ---------------- 正文 ---------------- */

.doc-body {
  font-size: 16.5px;
}

.doc-body h2 {
  margin: 46px 0 16px;
  padding-bottom: 10px;
  font-size: 23.5px;
  border-bottom: 1px solid var(--divider, #ecede9);
}

.doc-body h3 {
  margin: 34px 0 12px;
  font-size: 19px;
}

.doc-body h4,
.doc-body h5,
.doc-body h6 {
  margin: 26px 0 10px;
  font-size: 17px;
}

.doc-anchor {
  margin-left: 8px;
  font-weight: 400;
  color: var(--border, #e5e7e2);
  opacity: 0;
  transition: opacity 160ms var(--ease-out, ease-out);
}

.doc-body :is(h2, h3, h4):hover .doc-anchor,
.doc-anchor:focus-visible {
  opacity: 1;
}

.doc-body p {
  margin: 18px 0;
}

.doc-body ul,
.doc-body ol {
  margin: 12px 0;
  padding-left: 24px;
}

.doc-body li {
  margin: 6px 0;
}

.doc-body li > ul,
.doc-body li > ol {
  margin: 6px 0;
}

.doc-body strong {
  font-weight: 600;
}

.doc-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-secondary, #f0f1ec);
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.doc-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--border, #e5e7e2);
  border-radius: 0 8px 8px 0;
  background: var(--surface-secondary, #f0f1ec);
  color: var(--text-secondary, #656b66);
}

.doc-hr {
  margin: 28px 0;
  border: none;
  border-top: 1px solid var(--divider, #ecede9);
}

/* 表格：窄屏可横向滚动，不撑破布局 */
.doc-table {
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 10px;
}

.doc-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--surface, #fff);
}

.doc-table th,
.doc-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--divider, #ecede9);
  vertical-align: top;
}

.doc-table thead th {
  background: var(--surface-secondary, #f0f1ec);
  font-weight: 600;
  white-space: nowrap;
}

.doc-table tbody tr:last-child td {
  border-bottom: none;
}

/* 代码块 */
.doc-pre {
  position: relative;
  margin: 16px 0;
}

.doc-pre pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 10px;
  background: #23282b;
  color: #e8ece9;
  font-size: 13.5px;
  line-height: 1.6;
}

.doc-pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.doc-pre__copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #dfe5e1;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.doc-pre__copy:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* 图片：帮助文档的核心内容，给足空间并支持点开看大图 */
.doc-figure {
  margin: 20px 0;
  text-align: center;
}

.doc-figure img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 10px;
  cursor: zoom-in;
}

.doc-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-tertiary, #929792);
}

.doc-body img:not(.doc-figure img) {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* 图片放大浮层 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(20, 24, 22, 0.86);
  cursor: zoom-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

/* ---------------- 提示块 ---------------- */

.callout {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid;
  font-size: 15.5px;
}

.callout__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 600;
}

.callout__icon {
  flex: none;
}

.callout__body > :first-child {
  margin-top: 0;
}

.callout__body > :last-child {
  margin-bottom: 0;
}

/* 三种类型用「图标 + 文字标题 + 颜色」三重区分，不单靠颜色 */
.callout--tip {
  border-color: #bcd4c5;
  background: var(--brand-subtle, #f3f6f3);
  color: #2f4437;
}

.callout--tip .callout__icon {
  color: var(--success, #557a64);
}

.callout--warn {
  border-color: #e6d3b3;
  background: var(--energy-light, #f5ede2);
  color: #5c4526;
}

.callout--warn .callout__icon {
  color: var(--energy, #c89552);
}

.callout--danger {
  border-color: #e3c3bf;
  background: #f9edec;
  color: #6b3730;
}

.callout--danger .callout__icon {
  color: var(--error, #b75c55);
}

/* ---------------- 反馈与相关 ---------------- */

.doc-feedback,
.doc-more {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--divider, #ecede9);
  font-size: 14px;
  color: var(--text-secondary, #656b66);
}

.fb-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.fb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 10px;
  background: var(--surface, #fff);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary, #202421);
  cursor: pointer;
}

.fb-btn:hover {
  border-color: var(--brand, #5f7668);
  color: var(--brand-dark, #4f6458);
}

.fb-btn svg {
  width: 22px;
  height: 22px;
}

.fb-btn[aria-pressed='true'] {
  border-color: var(--brand, #5f7668);
  background: var(--brand-light, #e8eee9);
  color: var(--brand-dark, #4f6458);
}

.fb-thanks {
  margin-top: 12px;
  color: var(--text-tertiary, #929792);
}

.doc-related h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.doc-related ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 10px;
  background: var(--surface, #fff);
}

.doc-related a:hover {
  border-color: var(--brand, #5f7668);
  text-decoration: none;
}

.rel-cat {
  flex: none;
  font-size: 12px;
  color: var(--text-tertiary, #929792);
}

.doc-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.doc-pager a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 10px;
  background: var(--surface, #fff);
  font-size: 14px;
}

.doc-pager a:hover {
  border-color: var(--brand, #5f7668);
  text-decoration: none;
}

.doc-pager span {
  font-size: 12px;
  color: var(--text-tertiary, #929792);
}

.pager-next {
  text-align: right;
}

/* ---------------- 首页 / 分类页 ---------------- */

.help-home,
.help-search {
  max-width: 1000px;
  margin: 0 auto;
  padding: 100px 28px 80px;
}

/* ---------------- 首页 hero 搜索 ----------------
 * 按参考图（飞书帮助中心搜索页）1:1 还原，参数是从图上量出来的，不是目测：
 *   图 1882px 宽，搜索框 1200×120px → 按「框高 120px ≈ 逻辑 57px」标定比例 2.11×
 *   标题字面高 74px ÷ 2.11 ÷ 0.88 ≈ 40px；图标 28px 方 → 16px；距框左 49px → 22px；
 *   占位文字字面 31px → 17px；标题底到框顶 53px → 25px
 * 两处刻意的偏离，都在下面就近注明。
 */

.hero-search {
  text-align: center;
  /* 参考图「蓝带起点→胶囊顶」是 159 逻辑 px；这里补到实测对齐（差 4px 内）。 */
  padding: 44px 0 56px;
}

.hero-search h1 {
  margin: 0 0 25px;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.25;
  /* 参考图的标题色 #1f232a —— 比 --text-primary #202421 略偏冷，是飞书的品牌语义色。
     这里保留我们自己的 --text-primary，避免为一次搜索样式引入第二套文字色。 */
  color: var(--text-primary, #202421);
}

/* 404 页用：hero 标题下的一句说明 */
.hero-sub {
  margin: -12px 0 24px;
  font-size: 16px;
  color: var(--text-secondary, #656b66);
}

.hero-form,
.search-form {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.hero-form__icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #8f959e;
  pointer-events: none;
}

.hero-form input,
.search-form input {
  width: 100%;
  height: 56px;
  /* 左内距 = 图标左距 22 + 图标宽 16 + 间隙 12 = 50（图上量得文字起始 48px） */
  padding: 0 26px 0 50px;
  border: none;
  border-radius: 28px; /* = 高度一半 → 胶囊 */
  background: #fff;
  font-size: 17px;
  font-family: inherit;
  color: var(--text-primary, #202421);
  /* 图上框下缘比背景暗 12/255 且扩散到 70px 外 → 大面积低透明度柔和投影 */
  box-shadow: 0 10px 34px rgba(31, 35, 42, 0.1), 0 2px 8px rgba(31, 35, 42, 0.05);
  transition: box-shadow 200ms var(--ease-out, ease-out);
}

.hero-form input::placeholder,
.search-form input::placeholder {
  color: #999ea7; /* 图上量得，比 --text-tertiary 更浅（这是占位符，不承载信息） */
}

/* 聚焦不用默认 outline：胶囊形状套方角轮廓很难看。
   但**必须**有等价替代 —— 这里是一条 3px 的品牌色光环，可见性不低于 outline。 */
.hero-form input:focus,
.search-form input:focus {
  outline: none;
  box-shadow: 0 12px 40px rgba(31, 35, 42, 0.14), 0 0 0 3px rgba(95, 118, 104, 0.22);
}

.home-note {
  margin: -6px 0 14px;
  font-size: 13px;
  color: var(--text-tertiary, #929792);
}

.home-block {
  margin-top: 44px;
}

.home-block h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.home-note {
  margin: -6px 0 14px;
  font-size: 13px;
  color: var(--text-tertiary, #929792);
}

.home-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 14px;
  background: var(--surface, #fff);
  transition: border-color 200ms var(--ease-out, ease-out), transform 200ms var(--ease-out, ease-out);
}

.cat-card:hover {
  border-color: var(--brand, #5f7668);
  transform: translateY(-2px);
  text-decoration: none;
}

.cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--brand-subtle, #f3f6f3);
  color: var(--brand, #5f7668);
}

.cat-icon svg {
  width: 22px;
  height: 22px;
}

.cat-card__name {
  font-size: 17.5px;
  font-weight: 600;
  color: var(--text-primary, #202421);
}

.cat-card__desc {
  font-size: 15px;
  color: var(--text-secondary, #656b66);
  line-height: 1.6;
}

.cat-card__count {
  /* 推到卡片底部：等高卡片下，描述行数不同的卡片会在下方留出不等的空白 */
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  color: var(--text-tertiary, #929792);
}

.q-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.q-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 10px;
  background: var(--surface, #fff);
  font-size: 15px;
}

.q-list a:hover {
  border-color: var(--brand, #5f7668);
  text-decoration: none;
}

.q-title {
  color: var(--text-primary, #202421);
}

.q-meta {
  flex: none;
  font-size: 12px;
  color: var(--text-tertiary, #929792);
}

.ext-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.ext-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 10px;
  background: var(--surface, #fff);
}

.ext-link:hover {
  border-color: var(--brand, #5f7668);
  text-decoration: none;
}

.cat-head {
  margin-bottom: 26px;
}

.cat-head h1 {
  margin: 10px 0 8px;
  font-size: 28px;
}

.cat-desc {
  margin: 0;
  color: var(--text-secondary, #656b66);
}

.cat-count {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-tertiary, #929792);
}

.doc-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-card a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 12px;
  background: var(--surface, #fff);
}

.doc-card a:hover {
  border-color: var(--brand, #5f7668);
  text-decoration: none;
}

.doc-card h3 {
  margin: 0 0 8px;
  font-size: 17.5px;
  color: var(--text-primary, #202421);
}

.doc-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-secondary, #656b66);
  line-height: 1.65;
}

.doc-card__meta {
  margin-top: 8px !important;
  font-size: 13px !important;
  color: var(--text-tertiary, #929792) !important;
}

/* ---------------- 搜索页 ---------------- */

.search-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.cat-chip {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 999px;
  background: var(--surface, #fff);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-secondary, #656b66);
  cursor: pointer;
}

.cat-chip[aria-pressed='true'] {
  border-color: var(--brand, #5f7668);
  background: var(--brand-light, #e8eee9);
  color: var(--brand-dark, #4f6458);
  font-weight: 600;
}

.search-status {
  margin: 22px 0 12px;
  font-size: 14px;
  color: var(--text-tertiary, #929792);
}

.search-results {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-results a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 12px;
  background: var(--surface, #fff);
}

.search-results a:hover {
  border-color: var(--brand, #5f7668);
  text-decoration: none;
}

.res-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.res-title {
  font-size: 17.5px;
  font-weight: 600;
  color: var(--text-primary, #202421);
}

.res-cat {
  flex: none;
  font-size: 12px;
  color: var(--text-tertiary, #929792);
}

.res-snippet {
  font-size: 14.5px;
  color: var(--text-secondary, #656b66);
  line-height: 1.7;
}

.search-results mark,
.res-snippet mark {
  padding: 0 2px;
  border-radius: 3px;
  background: #fbeec9;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.search-empty {
  margin-top: 28px;
}

.search-empty > p {
  color: var(--text-secondary, #656b66);
}

/* ---------------- 页脚 ---------------- */

.help-footer {
  padding: 40px 28px 56px;
  border-top: 1px solid var(--divider, #ecede9);
  background: var(--surface, #fff);
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary, #929792);
}

.foot-cats,
.foot-links {
  margin-bottom: 10px;
  line-height: 2;
}

.foot-copy {
  margin: 14px 0 0;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 50%;
  background: var(--surface, #fff);
  color: var(--text-secondary, #656b66);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms var(--ease-out, ease-out), visibility 200ms;
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ---------------- 分类色彩编码 ----------------
 * 原来五个分类的图标底色全是 --brand-subtle 淡绿，等于没有编码 —— 而图标底色是
 * 「一眼分辨这是哪一类」性价比最高的一处（飞书帮助中心就用三种淡彩区分卡片）。
 *
 * 取色规则（避免显廉价）：淡底彩度压低、色相彼此间隔 ≥60°、图标与底同色相但彩度拉高；
 * 只给图标方块上色，**卡片边框永远中性**。五组都验过：图标/底 ≥4:1（UI 元素要求 3:1），
 * 底/卡片白底 ≥1.27（低于这个值小色块看不出颜色）。
 *
 * 两个选择器：首页卡片的 data-cat 在 <a> 上（整卡一个属性），分类页头部直接放在图标上。
 */
.cat-icon[data-cat='getting-started'],
.cat-card[data-cat='getting-started'] .cat-icon { background: #d5e7db; color: #2f6046; }
.cat-icon[data-cat='features'],
.cat-card[data-cat='features'] .cat-icon { background: #d2e2f6; color: #1f5d99; }
.cat-icon[data-cat='troubleshooting'],
.cat-card[data-cat='troubleshooting'] .cat-icon { background: #f4e2c6; color: #96632c; }
.cat-icon[data-cat='faq'],
.cat-card[data-cat='faq'] .cat-icon { background: #e2d8f0; color: #5c3f84; }
.cat-icon[data-cat='compliance'],
.cat-card[data-cat='compliance'] .cat-icon { background: #d6e1e8; color: #3c5a6b; }

/* ---------------- 文章底部的两个导航模块 ----------------
 * 「上一篇/下一篇」和「相关指南」职责不同，视觉上也要能区分：
 * 前者是**接着读**（同一条线性的下一步），用方向箭头 + 文章标题；
 * 后者是**换个话题读**，用弱化的列表 + 日期。
 * 两者都在 <main> 内，受同一个 820px 列宽约束 —— 之前相关指南写在了 main 之外，
 * 所以横向铺满整屏，这是被用户直接指出来的问题。
 */

.doc-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 52px;
}

.doc-pager a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 44px;
  padding: 18px 22px;
  border: 1px solid var(--border, #e5e7e2);
  border-radius: 14px;
  background: var(--surface, #fff);
  transition: border-color 200ms var(--ease-out, ease-out),
    box-shadow 200ms var(--ease-out, ease-out), transform 200ms var(--ease-out, ease-out);
}

.doc-pager a:hover {
  border-color: var(--brand, #5f7668);
  box-shadow: 0 4px 16px rgba(32, 36, 33, 0.07);
  transform: translateY(-1px);
  text-decoration: none;
}

/* 方向词小、标题大：一眼看到的是「下一篇讲什么」，不是「这是下一篇」 */
.pager-dir {
  font-size: 13.5px;
  color: var(--text-tertiary, #696f68);
}

.pager-title {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary, #202421);
}

.pager-next {
  text-align: right;
}

/* 首篇没有上一篇 / 末篇没有下一篇：这时只有一张卡，
   若还按两栏排会留下半屏空白，所以让它占满整行 */
.doc-pager--single {
  grid-template-columns: 1fr;
}

.pager-empty {
  display: none;
}

.doc-related {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--divider, #ecede9);
}

.doc-related h2 {
  margin: 0 0 16px;
  font-size: 17px;
}

/* 相关指南：一行标题 + 右侧日期，整行可点 */
.doc-related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
}

.rel-title {
  color: var(--text-primary, #202421);
  line-height: 1.5;
}

.rel-date,
.rel-cat {
  flex: none;
  margin-right: 8px;   /* 与右侧的箭头留出空隙，否则挤在一起 */
  font-size: 13.5px;
  color: var(--text-tertiary, #696f68);
}

/* ---------------- 可点击性线索 ----------------
 * 用户反馈「识别度低」，根因是大量「整块可点」的元素长得像静态文字：
 * 没有箭头、没有边框层次、hover 没有反馈。下面给每一类可点元素补上统一的三件套：
 * 右侧箭头 + 边框/底色层次 + hover 位移。箭头用 CSS 生成，不改 HTML 结构。
 */

.cat-card,
.doc-card a,
.q-list a,
.doc-related a,
.ext-link,
.search-results a {
  position: relative;
  transition: border-color 200ms var(--ease-out, ease-out),
    box-shadow 200ms var(--ease-out, ease-out),
    transform 200ms var(--ease-out, ease-out);
}

.cat-card:hover,
.doc-card a:hover,
.q-list a:hover,
.doc-related a:hover,
.ext-link:hover,
.search-results a:hover {
  border-color: var(--brand, #5f7668);
  box-shadow: 0 4px 16px rgba(32, 36, 33, 0.07);
  transform: translateY(-1px);
}

/* 分类卡片：图标带品牌底色 + 右下角箭头 */
/* 常驻箭头（不是 hover 才出现）：hover 才有的线索对「这块能不能点」毫无帮助，
   而卡片本身没有按钮样式，全靠这一下视觉提示。 */
.cat-card::after {
  content: '→';
  position: absolute;
  right: 20px;
  bottom: 20px;
  font-size: 17px;
  color: var(--brand, #5f7668);
  opacity: 0.45;
  transition: opacity 200ms var(--ease-out, ease-out), transform 200ms var(--ease-out, ease-out);
}

.cat-card:hover::after {
  opacity: 1;
  transform: translateX(3px);
}

/* 列表类条目：右侧常驻箭头（不是 hover 才出现 —— 那正是「看不出能点」的原因） */
.doc-card a,
.q-list a,
.doc-related a,
.ext-link,
.search-results a {
  padding-right: 44px;
}

.doc-card a::after,
.q-list a::after,
.doc-related a::after,
.ext-link::after,
.search-results a::after {
  content: '›';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  line-height: 1;
  color: var(--text-tertiary, #929792);
  transition: color 200ms var(--ease-out, ease-out), transform 200ms var(--ease-out, ease-out);
}

.doc-card a:hover::after,
.q-list a:hover::after,
.doc-related a:hover::after,
.ext-link:hover::after,
.search-results a:hover::after {
  color: var(--brand, #5f7668);
  transform: translateY(-50%) translateX(2px);
}

/* 左栏当前项：左侧色条 + 加粗，比纯底色更容易在长列表里扫到 */
.side-tree ul a[aria-current='page'] {
  position: relative;
  /* 原本用 --brand-light #e8eee9，与页面底 #f7f7f3 的对比只有 1.10:1（几乎同色同彩度），
     所以「高亮」看不出来。换成彩度更高一档的效果。 */
  background: #dce8e0;
  color: var(--brand-dark, #4f6458);
  font-weight: 600;
}

.side-tree ul a[aria-current='page']::before {
  content: '';
  position: absolute;
  left: -11px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: var(--brand, #5f7668);
}

/* 正文里的链接：默认就带下划线（帮助文档是工具，扫读时「哪里能点」比排版干净更重要） */
.doc-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(79, 100, 88, 0.35);
}

.doc-body a:hover {
  text-decoration-color: currentColor;
}

/* 页底「有用/没用」：给未选中态一点可点暗示 */
.fb-btn {
  transition: border-color 160ms var(--ease-out, ease-out), background 160ms var(--ease-out, ease-out);
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1199px) {
  .help-layout {
    grid-template-columns: 224px minmax(0, 1fr);
    gap: 32px;
  }

  .help-toc {
    display: none;
  }

  .toc-mobile {
    display: block;
    margin: 0 0 22px;
    padding: 12px 16px;
    border: 1px solid var(--border, #e5e7e2);
    border-radius: 10px;
    background: var(--surface, #fff);
    font-size: 14px;
  }

  .toc-mobile summary {
    cursor: pointer;
    font-weight: 600;
    min-height: 30px;
  }

  .toc-mobile ul {
    margin: 8px 0 0;
    padding-left: 18px;
  }

  .toc-mobile a {
    display: block;
    padding: 5px 0;
  }
}

@media (max-width: 900px) {
  .help-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 92px 20px 56px;
  }

  .help-main {
    max-width: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  /* 左目录改抽屉：默认移出视口，.is-open 时滑入 */
  .help-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 150;
    width: min(80vw, 320px);
    height: 100vh;
    max-height: none;
    padding: 88px 18px 28px;
    background: var(--surface, #fff);
    border-right: 1px solid var(--border, #e5e7e2);
    transform: translateX(-100%);
    transition: transform 240ms var(--ease-out, ease-out);
    overflow-y: auto;
  }

  .help-sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 140;
    background: rgba(20, 24, 22, 0.4);
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  body.drawer-open {
    overflow: hidden;
  }

  .nav-search {
    max-width: none;
  }

  .home-cols {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 15px;
  }

  /* 窄屏面包屑压成一行：当前页截断加省略号。
     否则长标题会被挤到第二行、整行只剩标题，看起来像坏了。 */
  .breadcrumb ol {
    flex-wrap: nowrap;
    overflow: hidden;
    gap: 6px;
    font-size: 15px;
  }

  .breadcrumb li {
    min-width: 0;
  }

  .breadcrumb li:not(:last-child) {
    flex: none;
  }

  .breadcrumb [aria-current='page'] {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .help-nav {
    gap: 10px;
    padding: 10px 14px;
  }

  /* 顶栏在窄屏只留「汉堡 + Logo + 帮助中心 + 搜索」：
     「›」层级前缀和「返回官网」都收掉（logo 本身就是回官网的链接），把宽度让给搜索框。 */
  .nav-home {
    display: none;
  }

  .nav-brand {
    font-size: 16px;
  }

  .nav-section {
    padding: 6px 9px;
    font-size: 15px;
  }

  .help-nav__bar {
    padding: 8px 14px;
  }

  /* 窄屏把「返回官网」收掉、把空间让给搜索框：logo 本身就是回官网的链接，
     而搜索框是帮助页里真正高频的入口（390px 下三个元素同排会把搜索挤到屏外）。 */
  .nav-home {
    display: none;
  }

  .nav-logo {
    gap: 6px;
  }
}

@media (max-width: 400px) {
  /* 超窄屏再让一步：只留图标，搜索框拿满剩余宽度 */
  .nav-brand {
    display: none;
  }

  .help-layout {
    padding: 84px 16px 48px;
  }

  .help-article h1 {
    font-size: 24px;
  }

  .doc-body h2 {
    font-size: 19px;
    margin-top: 32px;
  }

  .doc-body h3 {
    font-size: 16px;
  }

  .help-home,
  .help-search {
    padding: 100px 16px 56px;
  }

  .hero-search h1 {
    font-size: 26px;
  }

  .hero-form,
  .search-form {
    flex-direction: column;
  }

  .hero-form button,
  .search-form button {
    width: 100%;
  }

  .cat-grid {
    grid-template-columns: 1fr;
  }

  .doc-pager {
    grid-template-columns: 1fr;
  }

  .pager-next {
    text-align: left;
  }

  .back-top {
    right: 14px;
    bottom: 14px;
  }

  [id] {
    scroll-margin-top: 80px;
  }
}

/* 减弱动效：与官网同一约定 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* 打印：用户把帮助文档存 PDF / 打出来是常见需求，去掉一切导航噪音 */
@media print {
  .help-nav,
  .help-sidebar,
  .help-toc,
  .toc-mobile,
  .back-top,
  .doc-feedback,
  .doc-more,
  .sidebar-backdrop,
  .help-footer {
    display: none !important;
  }

  .help-layout {
    display: block;
    padding: 0;
    max-width: none;
  }

  .help-main {
    max-width: none;
  }

  .doc-body a::after {
    content: ' (' attr(href) ')';
    font-size: 12px;
    color: #666;
  }
}
