/**
 * fec.html 目录页阅读体验：减重复模块、先目录后导流
 * v20260623b
 */

body[data-page="fec-directory"] {
  --fec-step-h: 42px;
}

/* 与 lc-subnav / .container 对齐的 sticky 顶距与宽度 */
body[data-page="fec-directory"] .fec-step-bar {
  top: var(--lc-page-offset, 91px);
}

body[data-page="fec-directory"] .fec-step-bar > .container {
  max-width: 1100px !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

body[data-page="fec-directory"] .fec-step-bar__inner {
  width: 100%;
  max-width: 100%;
  justify-content: flex-start;
  gap: 0.5rem 0.75rem;
}

body[data-page="fec-directory"] .fec-step-bar__steps {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 0.35rem;
}

@media (min-width: 768px) {
  body[data-page="fec-directory"] .fec-step-bar__label {
    flex-shrink: 0;
  }
  body[data-page="fec-directory"] .fec-step-bar__steps {
    justify-content: flex-start;
  }
}

@media (min-width: 1024px) {
  body[data-page="fec-directory"] .fec-step-bar__inner {
    flex-wrap: nowrap;
  }
  body[data-page="fec-directory"] .fec-step-bar__steps {
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-left: auto;
  }
  body[data-page="fec-directory"] .fec-step-bar__step {
    flex-shrink: 0;
  }
}

body[data-page="fec-directory"] #filter-panel.fec-filter-sticky {
  top: calc(var(--lc-page-offset, 91px) + var(--fec-step-h));
}

@media (min-width: 1024px) {
  body[data-page="fec-directory"] #filter-panel.fec-filter-sticky {
    position: static;
  }
}

/* 顶部重复：organic 块、pair 三卡、桌面私域条（三步条已含 CTA） */
body[data-page="fec-directory"] .organic-snippet,
body[data-page="fec-directory"] .lc-pair-bar,
body[data-page="fec-directory"] .fec-desktop-biz-exit {
  display: none !important;
}

/* 紧凑 Hero */
body[data-page="fec-directory"] .fec-directory-hero .container {
  padding-top: 0.85rem !important;
  padding-bottom: 0.85rem !important;
}

body[data-page="fec-directory"] .fec-directory-hero .tldr {
  display: none;
}

body[data-page="fec-directory"] .fec-directory-hero h1 {
  font-size: 1.25rem !important;
}

@media (min-width: 768px) {
  body[data-page="fec-directory"] .fec-directory-hero h1 {
    font-size: 1.5rem !important;
  }
}

/* 目录主区优先：压缩分类标题上下留白 */
body[data-page="fec-directory"] .category-title {
  padding-top: 1.25rem !important;
  margin-bottom: 0.5rem !important;
}

body[data-page="fec-directory"] #domestic > .category:first-child .category-title {
  padding-top: 0.5rem !important;
}

/* 列表中段长文默认折叠 */
.fec-insight-block {
  margin: 1rem 0 1.25rem;
  border: 1px solid #e9d5ff;
  border-radius: 14px;
  background: #faf5ff;
  overflow: hidden;
}

.fec-insight-block > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #6d28d9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fec-insight-block > summary::-webkit-details-marker {
  display: none;
}

.fec-insight-block > summary::before {
  content: "+";
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #ede9fe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.fec-insight-block[open] > summary::before {
  content: "−";
}

.fec-insight-block__body {
  padding: 0 0.75rem 0.75rem;
}

.fec-insight-block__body > .rounded-2xl {
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* 页底 AI 大区块改为轻量（保留 SEO 链接，默认不抢视线） */
body[data-page="fec-directory"] #ai-lowcode {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
  background: #f8fafc !important;
}

body[data-page="fec-directory"] #ai-lowcode .absolute.inset-0 {
  display: none;
}

body[data-page="fec-directory"] #ai-lowcode h2 {
  font-size: 1.125rem !important;
}

body[data-page="fec-directory"] #ai-lowcode .grid.lg\\:grid-cols-5 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

body[data-page="fec-directory"] #ai-lowcode .col-span-2 {
  grid-column: span 1;
}

body[data-page="fec-directory"] #consult-service {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

body[data-page="fec-directory"] .nav-container {
  top: calc(var(--lc-page-offset, 91px) + var(--fec-step-h)) !important;
}

body[data-page="fec-directory"] #consult-service h2 {
  font-size: 1.125rem !important;
}

/* 读完目录后的「下一步」紧凑版 */
body[data-page="fec-directory"] .fec-directory-next {
  padding: 1.25rem 0 1.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-top: 1px solid #e5e7eb;
}

body[data-page="fec-directory"] .fec-directory-next__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem;
  text-align: center;
}

body[data-page="fec-directory"] .fec-directory-next__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 768px) {
  body[data-page="fec-directory"] .fec-directory-next__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

body[data-page="fec-directory"] .fec-directory-next__card {
  display: block;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

body[data-page="fec-directory"] .fec-directory-next__card:hover {
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

body[data-page="fec-directory"] .fec-directory-next__card strong {
  display: block;
  font-size: 0.8125rem;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

body[data-page="fec-directory"] .fec-directory-next__card span {
  font-size: 0.6875rem;
  color: #64748b;
}
