/* ============================================================
   shell.css — 顶栏 / 导航 / 页头 / 页脚（三个页面共用）
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 15, 17, 0.86);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 26px;
}

/* ---------- 品牌 ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: opacity var(--fast) var(--ease);
}
.brand:hover { opacity: 0.85; }

.brand__mark {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #f2f4f5;
  color: #0c0e10;
  flex-shrink: 0;
}

.brand__name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ---------- 导航：下划线指示当前页 ---------- */
.nav {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  flex-shrink: 0;
}

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 2px;
  margin-right: 20px;
  font-size: 13.5px;
  color: var(--text-3);
  transition: color var(--fast) var(--ease);
}
.nav__link:hover { color: var(--text-2); }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  transition: background var(--fast) var(--ease);
}
.nav__link[aria-current="page"]::after { background: var(--text); }

/* ---------- 搜索 ---------- */
.topsearch {
  position: relative;
  margin-left: auto;
  flex: 0 1 250px;
  min-width: 0;
}
.topsearch .field {
  height: 32px;
  padding-left: 32px;
  padding-right: 38px;
  background: rgba(255, 255, 255, 0.045);
  border-color: transparent;
  font-size: 12.5px;
}
.topsearch .field:hover { background: rgba(255, 255, 255, 0.07); }
.topsearch .field:focus {
  background: var(--surface-2);
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.topsearch__icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.topsearch__key {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ---------- 访问量 ---------- */
.topstat {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
}

/* ---------- 页头（主页 / 探索 / 日志） ---------- */
.pagehead {
  padding: 38px 0 26px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.pagehead__title {
  font-size: 29px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.pagehead__desc {
  margin-top: 7px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 62ch;
}
.pagehead__desc b { color: var(--text); font-weight: 600; }

.pagehead__aside {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--text-3);
  text-align: right;
  white-space: nowrap;
}
.pagehead__aside b { color: var(--text-2); font-weight: 500; }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: var(--s8);
  border-top: 1px solid var(--line);
  /* 底部留出空间，别让回到顶部按钮压住页脚链接 */
  padding: 26px 0 88px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  font-size: 12px;
  color: var(--text-3);
}
.foot__links {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.foot a { color: var(--text-2); transition: color var(--fast) var(--ease); }
.foot a:hover { color: var(--text); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .topstat { display: none; }
}
@media (max-width: 720px) {
  .topbar__inner { gap: 16px; padding: 0 16px; }
  .nav__link { margin-right: 14px; }
  .topsearch { flex-basis: 150px; }
  .topsearch__key { display: none; }
  .topsearch .field { padding-right: 12px; }
  .pagehead { padding: 26px 0 18px; }
  .pagehead__title { font-size: 23px; }
  .pagehead__aside { display: none; }
}
@media (max-width: 560px) {
  .brand__name { max-width: 108px; overflow: hidden; text-overflow: ellipsis; }
  .nav__link { font-size: 13px; margin-right: 12px; }
  .topsearch { flex-basis: 108px; }
  .topsearch .field { padding-left: 28px; font-size: 12px; }
  .topsearch__icon { left: 8px; }
  .foot__links { margin-left: 0; }
}
