/* ============================================================
 * emerald 主题 - 文档中心页样式
 * 区块：文档头部（标题 + 搜索）/ 分类卡片列表
 * ============================================================ */

/* ============ 文档头部 ============ */
.em-doc-hero {
  position: relative; overflow: hidden;
  padding: 56px 0 56px;
  background: var(--em-hero-bg); color: #fff; text-align: center;
}
/* 与首页一致的网格纹理 */
.em-doc-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.em-doc-hero .em-container { position: relative; z-index: 1; }
.em-doc-kicker {
  display: inline-block; padding: 4px 12px;
  font-size: 13px; color: rgba(255, 255, 255, .8);
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px;
  background: rgba(255, 255, 255, .05);
}
.em-doc-title { margin-top: 18px; font-size: 34px; font-weight: 600; line-height: 1.3; }
.em-doc-desc { margin-top: 12px; font-size: 15px; color: rgba(255, 255, 255, .6); }
.em-doc-search {
  display: flex; width: 100%; max-width: 520px; height: 48px;
  margin: 28px auto 0; overflow: hidden;
  background: #fff; border-radius: var(--em-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}
.em-doc-search input {
  flex: 1; min-width: 0; padding: 0 18px;
  border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--em-ink-1);
}
.em-doc-search input::placeholder { color: var(--em-ink-3); }
.em-doc-search button {
  flex-shrink: 0; width: 96px;
  border: none; background: var(--em-primary); color: #fff;
  font-size: 14px; cursor: pointer; transition: background .2s;
}
.em-doc-search button:hover { background: var(--em-primary-active); }

/* ============ 分类列表 ============ */
.em-doc-body { padding: 64px 0 96px; background: var(--em-bg); }
.em-doc-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.em-doc-subtitle { font-size: 20px; font-weight: 600; color: var(--em-ink-1); }
.em-doc-count { font-size: 13px; color: var(--em-ink-3); }
.em-doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.em-doc-card {
  padding: 22px 24px 14px;
  background: #fff; border: 1px solid var(--em-line); border-radius: var(--em-radius);
}
.em-doc-card-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px; border-bottom: 1px solid var(--em-line);
}
.em-doc-card-icon {
  flex-shrink: 0; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--em-primary); background: var(--em-primary-bg); border-radius: 3px;
}
.em-doc-card-icon svg { width: 18px; height: 18px; }
.em-doc-card-name { flex: 1; font-size: 16px; font-weight: 600; color: var(--em-ink-1); }
.em-doc-card-count { font-size: 12px; color: var(--em-ink-3); }
.em-doc-card-list { padding-top: 4px; }
.em-doc-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed var(--em-line);
  font-size: 14px; color: var(--em-ink-2); transition: color .2s;
}
.em-doc-item:last-child { border-bottom: none; }
.em-doc-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-doc-item::after { content: "›"; font-size: 16px; line-height: 1; color: var(--em-line); transition: color .2s, transform .2s; }
.em-doc-item:hover { color: var(--em-primary); }
.em-doc-item:hover::after { color: var(--em-primary); transform: translateX(2px); }

/* 空状态 */
.em-doc-empty { padding: 72px 0; text-align: center; font-size: 14px; color: var(--em-ink-3); }

/* ============ 响应式 ============ */
@media (max-width: 992px) {
  .em-doc-title { font-size: 28px; }
  .em-doc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .em-doc-hero { padding: 40px 0 40px; }
  .em-doc-grid { grid-template-columns: 1fr; }
  .em-doc-search { height: 44px; }
}
