/*
 * docs-index.css — docs 站首页（导航枢纽）专用样式
 *
 * 这个文件只服务 quickfind-docs/index.html，不属于主站共享资产：
 * - 主站没有对应的块（它是文档站拆分后才出现的新形态）；
 * - 只用 tokens.css 的 --qf-* 变量，所以**深浅色主题自动跟随**，不必写两套。
 *
 * 视觉范式：与 docs-site.css 同一套 Vercel 风（2026-10-16 重设计）。
 * 首页最容易犯的错是「每个区块都做成一个彩色卡片」，7 个 section 叠下来就变回
 * 营销页了。这里的做法是：**区块之间靠一条细线和上下留白分隔，只有卡片本身有
 * 边框**；品牌色只出现在「进入章节」的箭头和搜索焦点上。
 *
 * ⚠ 类名契约：这些名字被 build_docs_pages.js 的 buildIndex() 写进生成页的
 *   HTML，改名必须同步改生成器，否则首页样式整体失效（且构建期不报错）。
 *
 * 由 _tools/build_docs_pages.js 生成首页时引用；不要手改 index.html。
 */

/* ---------------------------------------------------------------------------
   1. Hero：纯背景 + 大标题。插图保留（它是抽象搜索示意，不依赖外部图片）
   --------------------------------------------------------------------------- */
.page-hero.docs-idx-hero {
  text-align: left;
  padding: 52px 0 44px;
  background: none;
}

.docs-idx-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: center;
}

.page-hero.docs-idx-hero .lead {
  margin-left: 0;
  max-width: 60ch;
}

/* kicker 降级成一行灰色小标签，不再是彩色胶囊 */
.page-hero.docs-idx-hero .kicker {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--qf-text-muted);
}

.page-hero.docs-idx-hero h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 14px;
}

.docs-idx-hero-sub {
  margin-top: 0;
  max-width: 60ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--qf-text-muted);
}

.docs-idx-hero-art {
  min-width: 0;
}

.docs-idx-art {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------------------
   2. 三步上手：从「三个带阴影的方块」改成一行连续的步骤序列
   --------------------------------------------------------------------------- */
.docs-idx-tight {
  padding: 40px 0 0;
}

.docs-idx-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--qf-border-soft);
}

.docs-idx-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 24px 22px 0;
  border-bottom: 1px solid var(--qf-border-soft);
  background: none;
}

.docs-idx-step + .docs-idx-step {
  padding-left: 24px;
  border-left: 1px solid var(--qf-border-soft);
}

/* 序号：从渐变实心圆改成等宽字体的浅灰数字，编号感靠排版不靠色块 */
.docs-idx-step-n {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  display: block;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  line-height: 1.6;
  color: var(--qf-text-muted);
  background: none;
}

.docs-idx-step-t {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--qf-text);
  margin: 0 0 4px;
}

.docs-idx-step-d {
  display: block;
  font-size: 13.2px;
  color: var(--qf-text-muted);
  line-height: 1.7;
}

/* 「这一步怎么做」在正文里是唯一该被点的东西：细下划线，不用按钮 */
.docs-idx-step-d a {
  color: var(--qf-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--qf-primary-ring);
  white-space: nowrap;
  transition: border-color .15s ease;
}

.docs-idx-step-d a:hover {
  border-bottom-color: var(--qf-primary);
}

/* ---------------------------------------------------------------------------
   3. 推荐阅读路线：SVG 自己响应用宽度，容器只负责留白
   --------------------------------------------------------------------------- */
.docs-idx-map {
  padding: 16px 0 0;
}

.docs-map-svg {
  display: block;
  width: 100%;
  height: auto;
}

.docs-map-svg a:hover rect {
  stroke: var(--qf-primary-ring);
}

/* ---------------------------------------------------------------------------
   4. 主题卡：全站唯一有边框的容器。hover 只加边框色，不浮起
   --------------------------------------------------------------------------- */
.docs-idx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 6px;
  padding: 0;
  list-style: none;
}

.docs-idx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 20px 20px 18px;
  border: 1px solid var(--qf-border-soft);
  border-radius: var(--docs-r-md);
  background: none;
  transition: border-color .16s ease, background .16s ease;
}

.docs-idx-card:hover {
  border-color: var(--qf-border);
  background: var(--qf-surface);
}

.docs-idx-card > a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

/* 图标：从渐变方块改成线性图标 + 焦点时给一点品牌色 */
.docs-idx-ico {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--docs-r-sm);
  background: none;
  color: var(--qf-text-muted);
  margin-bottom: 2px;
  transition: color .16s ease;
}

.docs-idx-card:hover .docs-idx-ico {
  color: var(--qf-primary);
}

.docs-idx-ico svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.6;
}

.docs-idx-card-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--qf-text);
}

.docs-idx-card-desc {
  font-size: 13.2px;
  line-height: 1.7;
  color: var(--qf-text-muted);
  flex: 1 1 auto;
}

/* 箭头在 hover 时右移 2px —— 唯一保留的动效，够用且不吵 */
.docs-idx-card-go {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--qf-text-muted);
  transition: color .16s ease, gap .16s ease;
}

.docs-idx-card-go::after {
  content: "→";
  transition: transform .16s ease;
}

.docs-idx-card:hover .docs-idx-card-go {
  color: var(--qf-primary);
}

.docs-idx-card:hover .docs-idx-card-go::after {
  transform: translateX(2px);
}

/* ---------------------------------------------------------------------------
   5. 角色卡：四条并列的入口。去掉虚线框，用留白分组
   --------------------------------------------------------------------------- */
.docs-idx-roles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 6px;
  padding: 0;
  list-style: none;
}

.docs-idx-role {
  padding: 0;
  border: 0;
  border-top: 1px solid var(--qf-border);
  border-radius: 0;
  background: none;
  padding-top: 16px;
}

.docs-idx-role-h {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--qf-text);
  margin: 0 0 10px;
}

.docs-idx-role-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.docs-idx-role-list a {
  font-size: 13.2px;
  color: var(--qf-text-muted);
  text-decoration: none;
  transition: color .15s ease;
}

.docs-idx-role-list a:hover {
  color: var(--qf-primary);
}

/* ---------------------------------------------------------------------------
   6. 版本说明：唯一使用 info 底色的块，因为它确实是「提示」
   --------------------------------------------------------------------------- */
.docs-idx-note {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 24px;
  border: 0;
  border-left: 3px solid var(--qf-info);
  border-radius: 0 var(--docs-r-sm) var(--docs-r-sm) 0;
  background: var(--qf-info-note);
  font-size: 13.2px;
  line-height: 1.7;
  color: var(--qf-text-muted);
}

.docs-idx-note svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--qf-info);
  stroke-width: 1.8;
}

/* ---------------------------------------------------------------------------
   7. 六个独立页顶部的横向导航：宽屏由 CSS 隐藏，让位给左栏
   --------------------------------------------------------------------------- */
.doc-page-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-page-list a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--docs-r-md);
  background: none;
  font-size: 13px;
  color: var(--qf-text-muted);
  text-decoration: none;
  transition: color .15s ease, background .15s ease;
}

.doc-page-list a:hover {
  background: var(--qf-surface-hover);
  color: var(--qf-text);
}

.doc-page-list a[aria-current="page"] {
  border-color: var(--qf-border);
  background: var(--qf-surface);
  color: var(--qf-text);
  font-weight: 500;
}

/* ---------------------------------------------------------------------------
   8. 响应式
   --------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .docs-idx-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docs-idx-hero-art { display: none; }
  .docs-idx-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-idx-roles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  /* 三步在窄屏堆叠：竖线要跟着转成横线，否则左边框会缺一段 */
  .docs-idx-steps { grid-template-columns: 1fr; }
  .docs-idx-step { padding: 16px 0; }
  .docs-idx-step + .docs-idx-step {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 639px) {
  .page-hero.docs-idx-hero { padding: 36px 0 30px; }
  .docs-idx-grid { grid-template-columns: 1fr; }
  .docs-idx-roles { grid-template-columns: 1fr; gap: 16px; }
}