/* 设计决策：navbar 8 项一级菜单，无需强制换行，回归 Bootstrap 5 navbar 默认单行布局 */

/* 中等屏下收紧 search 输入框，避免占太多横向空间挤压菜单项 */
@media (max-width: 1399.98px) {
  #navbar > form.search input#search-query {
    width: 6rem;
  }
}

/* 窄屏下隐藏 search 输入框，给菜单项留空间 */
@media (max-width: 1279.98px) {
  #navbar > form.search {
    display: none;
  }
}

/* landing page hero 区视觉 */
.landing-hero {
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.04) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 1rem;
}

/* 子站入口卡片 hover */
a .card.border-start:hover {
  transform: translateY(-2px);
  transition: transform 0.15s ease-in-out;
}

/* 设计决策：landing page 卡片内禁用 anchorjs 锚点和 external 链接图标，避免视觉干扰 */
.card .anchorjs-link { display: none !important; }
a.external:has(.card)::after { display: none !important; }

/* 设计决策：限制左侧 TOC sidebar 宽度，默认 360px 偏宽挤占正文，收紧为 280px */
main > .toc-offcanvas { max-width: 280px !important; }

/* 设计决策：footer 内容居中，版权与备案号常见排版习惯 */
footer.border-top { text-align: center; }
footer.border-top a { color: inherit; text-decoration: none; }
footer.border-top a:hover { text-decoration: underline; }

/* 设计决策：卡片左边框改用 Bootstrap 5 调色板柔和色阶（300 级），
   避免原色在 Light 下饱和度过高刺眼，同时图标保留原色提供视觉区分 */
.card.border-start.border-4.border-primary { border-left-color: #748ffc !important; }
.card.border-start.border-4.border-success { border-left-color: #69db7c !important; }
.card.border-start.border-4.border-warning { border-left-color: #ffa94d !important; }
.card.border-start.border-4.border-info    { border-left-color: #99e9f2 !important; }
.card.border-start.border-4.border-danger { border-left-color: #ffa8a8 !important; }
.card.border-start.border-4.border-secondary { border-left-color: #adb5bd !important; }

/* 设计决策：Dark 模式下卡片左边框改用 200 级色阶，提升深色背景下的可见度 */
[data-bs-theme="dark"] .card.border-start.border-4.border-primary { border-left-color: #a5d8ff !important; }
[data-bs-theme="dark"] .card.border-start.border-4.border-success { border-left-color: #b2f2bb !important; }
[data-bs-theme="dark"] .card.border-start.border-4.border-warning { border-left-color: #ffec99 !important; }
[data-bs-theme="dark"] .card.border-start.border-4.border-info    { border-left-color: #c5f6fa !important; }
[data-bs-theme="dark"] .card.border-start.border-4.border-danger { border-left-color: #ffd5d5 !important; }
[data-bs-theme="dark"] .card.border-start.border-4.border-secondary { border-left-color: #dee2e6 !important; }

/* 设计决策：卡片标题图标颜色也用柔和色阶（避免标题文字 + 图标全用原色过重） */
.card .h5.text-primary { color: #4c6ef5 !important; }
.card .h5.text-success { color: #37b24d !important; }
.card .h5.text-warning { color: #f59f00 !important; }
.card .h5.text-info    { color: #1c7ed6 !important; }
.card .h5.text-danger  { color: #e8590c !important; }
.card .h5.text-secondary { color: #495057 !important; }

[data-bs-theme="dark"] .card .h5.text-primary { color: #a5d8ff !important; }
[data-bs-theme="dark"] .card .h5.text-success { color: #b2f2bb !important; }
[data-bs-theme="dark"] .card .h5.text-warning { color: #ffec99 !important; }
[data-bs-theme="dark"] .card .h5.text-info    { color: #c5f6fa !important; }
[data-bs-theme="dark"] .card .h5.text-danger  { color: #ffd5d5 !important; }
[data-bs-theme="dark"] .card .h5.text-secondary { color: #dee2e6 !important; }
