/* ==========================================================================
   home.css —— 门户首页（文档入口）版式
   适用：仓库根目录 index.html
   依赖：必须先引入 base.css
   ========================================================================== */

body { padding: 56px 16px; }

/* --- 页头（含方块 Logo） ------------------------------------------------- */
header { text-align: center; margin-bottom: 40px; }

header .logo {
  display: inline-block;
  width: 56px;
  height: 56px;
  line-height: 56px;
  border-radius: 16px;
  background: var(--c-primary);
  color: var(--c-white);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

header h1 {
  font-size: 30px;
  color: var(--c-primary);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
header p { color: var(--c-muted); font-size: 14px; }

/* --- 板块卡片 ------------------------------------------------------------ */
section {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 24px 26px 26px;
  margin-bottom: 20px;
}

section > h2 {
  font-size: 19px;
  color: var(--c-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
section > h2 .no { color: var(--c-primary-4); font-size: 16px; font-weight: 600; }
section > h2 .enter {
  margin-left: auto;
  font-size: 13px;
  font-weight: 400;
  color: var(--c-primary-2);
  text-decoration: none;
}
section > h2 .enter:hover { text-decoration: underline; }

/* 建设中角标（备用：板块未上线时挂在 h2 内） */
.badge {
  font-size: 12px;
  font-weight: 400;
  padding: 2px 10px;
  border-radius: 10px;
  background: #fafafa;
  color: #aaa;
  border: 1px dashed #ccc;
}

.sec-desc {
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: 18px;
  padding-left: 12px;
  border-left: 3px solid var(--c-line-2);
}

h3.sub {
  font-size: 14px;
  color: var(--c-primary-3);
  font-weight: 600;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-tint);
}
h3.sub:first-of-type { margin-top: 4px; }

/* --- 文档卡片网格 -------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fbfcfe;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
  border-color: #c9d8ea;
}

.card .name { font-size: 15px; font-weight: 600; color: var(--c-ink); }
.card .desc { font-size: 12.5px; color: #8b98a5; margin-top: 4px; }

/* 卡片右上角的状态标记：附件/样例、外部文档等 */
.card .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: 2px;
  white-space: nowrap;
}
.card .tag.attach   { background: #eef8f1; color: #2f7d4f; border: 1px solid #c6e3d0; }
.card .tag.external { background: var(--c-tint); color: var(--c-primary-3); border: 1px solid #c9d8ea; }
.card .tag.new      { background: #fdf0c8; color: #8a5b00; border: 1px solid #f0dfb0; }

/* 主推卡片：深色渐变（备用，用于板块主入口） */
.card.main {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-2) 100%);
  border: none;
  color: var(--c-white);
}
.card.main .name { color: var(--c-white); }
.card.main .desc { color: #d3e0f0; }

/* --- 建设中占位块（备用） ------------------------------------------------ */
.placeholder {
  border: 1px dashed #d3dde7;
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  color: #a8b4c0;
  font-size: 13px;
  background: #fbfcfd;
}
