/* 更克制的正文密度 */
.md-typeset {
  font-size: 15px;
  line-height: 1.75;
}

/* 标题更像帮助中心 */
.md-typeset h1 {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.md-typeset h2 {
  font-weight: 600;
  margin-top: 1.4em;
}

/* 内容区更像知识库：限制行宽 */
.md-content__inner {
  max-width: 920px;
}

/* 链接更克制 */
.md-typeset a { text-decoration: none; }
.md-typeset a:hover { text-decoration: underline; }

/* 统一把 Material 的“默认文字/链接/强调色”从纯黑改为深灰（接近 cocoduck） */
:root {
  --md-default-fg-color: #2f2f2f;
  --md-default-fg-color--light: #404040;
  --md-typeset-a-color: #404040;
  --md-accent-fg-color: #404040;
}
[data-md-color-scheme="slate"] {
  --md-default-fg-color: #d0d0d0;
  --md-default-fg-color--light: #c8c8c8;
  --md-typeset-a-color: #d0d0d0;
  --md-accent-fg-color: #d0d0d0;
}

/* ===== 左侧一级目录标题：增加行距与呼吸感（接近 cocoduck） ===== */
.md-sidebar--primary .md-nav__title {
  font-size: 1.02rem !important;
  font-weight: 700 !important;

  line-height: 1.7 !important;      /* 行距更松 */
  padding: 0.65em 0 !important;     /* 上下留白 */
  margin-bottom: 0.3em !important;  /* 与二级列表拉开 */

  color: var(--md-default-fg-color--light) !important;
}


/* 左侧导航：二级/三级链接更小 */
.md-sidebar--primary .md-nav__link {
  font-size: 0.82rem !important;
  line-height: 1.55 !important;
  font-weight: 500 !important;
  color: var(--md-default-fg-color--light) !important;
}

/* 当前选中项：略强调但不变黑 */
.md-sidebar--primary .md-nav__link--active,
.md-sidebar--primary .md-nav__item--active > .md-nav__link,
.md-sidebar--primary .md-nav__link--active .md-ellipsis {
  font-weight: 600 !important;
  color: var(--md-default-fg-color--light) !important;
}

/* 隐藏右侧页面目录（TOC） */
.md-sidebar--secondary { display: none !important; }
.md-content { max-width: 100% !important; }

/* ===== 关键修复：可点击的一级目录其实是 link，不是 title ===== */
.md-sidebar--primary .md-nav__item--section > .md-nav__link {
  font-size: 1.02rem !important;
  font-weight: 700 !important;   /* 一级加粗在这里才生效 */
  line-height: 1.7 !important;
  padding: 0.65em 0 !important;
  color: var(--md-default-fg-color--light) !important;
}

/* 防止一级 link 内部文字节点（ellipsis）被覆盖 */
.md-sidebar--primary .md-nav__item--section > .md-nav__link .md-ellipsis {
  font-weight: 700 !important;
}

/* ===== 页面正文底部留白，增加呼吸感 ===== */
.md-content__inner {
  padding-bottom: 12rem;
}

.md-content__inner > :last-child {
  margin-bottom: 2rem;
}

/* ===== Header 左上角站点名（site_name）字体大小 ===== */
.md-header__title .md-ellipsis {
  font-size: 1.2rem;   /* 推荐 1.1–1.2 */
  font-weight: 600;
}

/* 放大 header 里的官网按钮（我们注入的🏠） */
#btn-homepage {
  font-size: 1.6rem !important;   /* 可调：1.2–1.6 */
  line-height: 1 !important;
}

/* 让按钮更好点按（可选） */
#btn-homepage.md-header__button {
  padding: 0.35rem 0.5rem !important;
}

/* Header 右上角：首页 按钮（最终推荐） */
#btn-homepage {
  font-size: 0.73rem;     /* 不要再低于 0.72 */
  font-weight: 500;       /* 比 600 更克制 */
  line-height: 1.2;       /* 关键：压视觉高度 */
  padding: 0.2rem 0.4rem !important;

  color: #6b7280;         /* 默认灰色（推荐） */
}

#btn-homepage {
  color: #2563eb;   /* blue-600 */
}
#btn-homepage:hover {
  color: #1d4ed8;   /* blue-700 */
}

/* =========================================================
   左侧导航：当前选中项高亮（不刺眼）
   ========================================================= */

/* 当前选中项（文字） */
.md-sidebar--primary
.md-nav__item--active > .md-nav__link,
.md-sidebar--primary
.md-nav__item--active > .md-nav__link .md-ellipsis,
.md-sidebar--primary
.md-nav__link--active,
.md-sidebar--primary
.md-nav__link--active .md-ellipsis {
  color: #1f6feb !important;   /* 蓝色，高亮但不艳 */
  font-weight: 600 !important;
}

/* hover 时稍微加深（可选） */
.md-sidebar--primary
.md-nav__link:hover .md-ellipsis {
  color: #1a5fd0;
}
