/* ============================================================
   gnav —— 主站全局统一吸顶导航（2026-11-30 全盘统一版）
   桌面：左「● 明远未来」+ 六大栏目，右「全部课程」+「今日学习 →」
   手机（≤820px）：第一行品牌 +「今日学习 →」，第二行六大栏目单行均分直达（零汉堡折叠、零溢出）
   ============================================================ */
.gnav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  z-index: 200;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
.gnav *, .pnav *, .chapternav * { box-sizing: border-box; }
.gnav, .pnav, .chapternav { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.gnav a { text-decoration: none; color: inherit; }

.gnav-in {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.gnav-left {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}
.gnav-brand {
  font-size: 18.5px;
  font-weight: 800;
  color: #16324F;
  letter-spacing: -0.4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.gnav-brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E8B34B;
  display: inline-block;
  flex-shrink: 0;
}
.gnav-projects {
  display: flex;
  align-items: center;
  gap: 22px;
}
.gnav-projects a {
  font-size: 14.5px;
  color: #475569;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}
.gnav-projects a:hover,
.gnav-projects a.active {
  color: #16324F;
  font-weight: 650;
}
.gnav-projects a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -15px;
  height: 2px;
  border-radius: 2px;
  background: #16324F;
}
.gnav-projects a .tag-hot {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #B45309;
  background: #FEF3C7;
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: 1px;
}
.gnav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.gnav-link-sub {
  font-size: 14px;
  color: #475569;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.gnav-link-sub:hover,
.gnav-link-sub.active {
  color: #16324F;
  font-weight: 650;
}
.btn-circle-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #16324F;
  color: #FFFFFF !important;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-circle-entry:hover {
  background: #0D2135;
}
.btn-circle-entry.is-logged-in {
  background: #E8B34B !important;
  color: #0D2135 !important;
  font-weight: 700;
}
.btn-circle-entry.is-logged-in:hover {
  background: #DCA338 !important;
}

.gnav-burger, .gnav-drawer { display: none !important; }

@media (max-width: 820px) {
  .gnav-in {
    position: relative;
    height: auto;
    padding: 10px 16px 8px;
    flex-wrap: wrap;
    gap: 0;
  }
  .gnav-left {
    flex-wrap: wrap;
    width: 100%;
    gap: 0;
  }
  .gnav-brand {
    font-size: 17.5px;
    height: 32px;
  }
  .gnav-right {
    position: absolute;
    top: 10px;
    right: 16px;
    gap: 8px;
  }
  .gnav-right .gnav-link-sub { display: none; }
  .gnav-right .btn-circle-entry {
    padding: 6px 13px;
    font-size: 12.5px;
    line-height: 1.2;
  }
  .gnav-projects {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 0 3px;
    border-top: 1px solid #F1F5F9;
    overflow: hidden;
  }
  .gnav-projects a {
    font-size: 13px;
    padding: 2px 0;
    flex-shrink: 0;
  }
  .gnav-projects a.active::after {
    bottom: -3px;
  }
  .gnav-projects a .tag-hot,
  .gnav-projects a .d-only {
    display: none;
  }
}

/* ============ 第二层：线页内吸顶条 pnav & 章节条 chapternav ============ */
.pnav {
  --g-ink: #16324F; --g-ink2: #475569; --g-hair: #E2E8F0;
  --g-btn: #16324F; --g-link: #16324F;
  position: sticky; top: 60px; z-index: 180;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(150%) blur(16px); -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--g-hair);
  color: var(--g-ink);
}
@media (max-width: 820px) {
  .pnav { top: 82px; }
}
.pnav-in { max-width: 1200px; margin: 0 auto; height: 48px; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.pnav-name { font-size: 14.5px; font-weight: 700; white-space: nowrap; }
.pnav-links { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pnav-links::-webkit-scrollbar { display: none; }
.pnav-links a { padding: 6px 9px; font-size: 13.5px; color: var(--g-ink2); white-space: nowrap; border-radius: 8px; text-decoration: none; }
.pnav-links a:hover { color: var(--g-link); }
.pnav-links a.on { color: var(--g-ink); font-weight: 650; box-shadow: inset 0 -2px 0 var(--g-btn); }
.pnav-cta { flex: 0 0 auto; background: var(--g-btn); color: #fff !important; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; white-space: nowrap; text-decoration: none; }
.pnav-tgt { scroll-margin-top: 120px; }

.chapternav {
  display: flex; gap: 24px; overflow-x: auto; padding: 14px 4px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chapternav::-webkit-scrollbar { display: none; }
.chapternav a { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 56px; text-decoration: none; }
.chapternav .ci { width: 40px; height: 40px; border-radius: 12px; background: #F0F5FA; display: flex; align-items: center; justify-content: center; }
.chapternav .ci svg { width: 20px; height: 20px; stroke: #16324F; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chapternav .cl { font-size: 12px; color: #475569; white-space: nowrap; }
.chapternav a.on .ci { background: rgba(22, 50, 79, 0.14); }
.chapternav a.on .cl { color: #16324F; font-weight: 650; }
