/* 站点功能导览（site_guide）前台样式 — sg- 前缀隔离；颜色/圆角全走 CSS 变量 */

/* ===== 导览页 ===== */

.sg-page {
  display: grid;
  gap: 14px;
}

.sg-headline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sg-headline h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sg-back {
  margin-left: auto;
}

.sg-intro {
  margin: 0;
  color: var(--tx-3);
  font-size: 14px;
}

/* 板块分区 */
.sg-section {
  padding: 16px;
}

.sg-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.sg-section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.sg-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--tx-3);
}

/* 条目卡片栅格（minmax(0,1fr) 防长文撑爆；auto-fill 自适应列数） */
.sg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.sg-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--bd);
  border-radius: var(--radius-s);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.sg-item:hover {
  border-color: var(--ac);
  box-shadow: var(--shadow);
}

.sg-item-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-s);
  background: var(--ac-soft);
  color: var(--ac-2);
}

.sg-item-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sg-item-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
}

.sg-item-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--tx-2);
}

.sg-item-go {
  margin-left: auto;
  flex: none;
  align-self: center;
  color: var(--tx-3);
}

a.sg-item:hover .sg-item-go {
  color: var(--ac);
}

.sg-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--tx-3);
  font-size: 14px;
}

/* ===== 首页引导块 ===== */

.sg-home {
  overflow: hidden;
}

.sg-home-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  text-decoration: none;
  color: inherit;
}

.sg-home-link:hover .sg-home-title {
  color: var(--ac);
}

.sg-home-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-s);
  background: var(--ac-soft);
  color: var(--ac-2);
}

.sg-home-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sg-home-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  transition: color 0.15s ease;
}

.sg-home-sub {
  font-size: 12.5px;
  color: var(--tx-3);
}

.sg-home-go {
  margin-left: auto;
  flex: none;
  color: var(--tx-3);
}

/* ===== 移动端 ===== */

@media (max-width: 640px) {
  .sg-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sg-headline h1 {
    font-size: 19px;
  }

  .sg-home-go {
    display: none;
  }
}
