/* 品牌外壳（静态页专用）
 * 来源：packages/brand/astro/BrandHeader.astro + BrandFooter.astro（同款类名与视觉）。
 * 用途：无法走 Astro 的静态页（/assessment/、/toolbox/ 等）与学院手写页需要同一套导航与页脚。
 * ⚠️ 改视觉请两边一起改；数据（导航项、slogan、备案）仍以 packages/brand/brand.config.json 为准。
 */

/* ---------- 顶栏 ---------- */
.bh {
  --bh-ink: #0B0E14;
  --bh-paper: #F5F7FA;
  --bh-ember: #FF7A29;
  --bh-cyan: #2DD4FF;
  --bh-muted: #8B93A1;
  --bh-line: rgba(245, 247, 250, .10);
  background: var(--bh-ink);
  border-bottom: 1px solid var(--bh-line);
  color: var(--bh-paper);
  position: sticky;
  top: 0;
  z-index: 30;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
.bh__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 16px;
}
.bh__brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; flex: none; }
.bh__brand img { display: block; border-radius: 8px; width: 32px; height: 32px; }
.bh__mark { width: 10px; height: 10px; border-radius: 50%; background: var(--bh-cyan); box-shadow: 0 0 0 3px rgba(45,212,255,.18); }
.bh__word { font-weight: 700; font-size: 16px; white-space: nowrap; }
.bh__sub { font-size: 12px; color: var(--bh-muted); letter-spacing: .5px; white-space: nowrap; }
.bh__nav { display: flex; gap: 2px; overflow: visible; flex: 1; margin-left: 4px; align-items: center; }
.bh__link {
  font-size: 13px; color: var(--bh-muted); padding: 7px 9px; border-radius: 8px;
  text-decoration: none; white-space: nowrap; transition: .15s;
}
.bh__link:hover { color: var(--bh-paper); background: rgba(255,255,255,.05); }
.bh__link.is-active { color: var(--bh-cyan); background: rgba(45,212,255,.10); }
.bh__link--out::after { content: "↗"; font-size: 10px; margin-left: 3px; opacity: .55; }
.bh__cta { display: flex; gap: 8px; flex: none; }
.bh__acct { display: flex; align-items: center; gap: 8px; }
.bh__hello { font-size: 13px; color: var(--bh-muted); white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.bh__btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 13px;
  border: 1px solid transparent; text-decoration: none; white-space: nowrap; transition: .18s;
}
.bh__btn--ghost { border-color: var(--bh-line); color: var(--bh-paper); }
.bh__btn--ghost:hover { border-color: var(--bh-cyan); color: var(--bh-cyan); }
.bh__btn--cyan { background: var(--bh-cyan); color: var(--bh-ink); }
.bh__btn--cyan:hover { filter: brightness(1.1); }

/* ---------- 二级菜单「更多」（.bh 与学院手写 .topbar 共用） ---------- */
.nav-more { position: relative; display: flex; align-items: center; }
.nav-more__btn {
  display: inline-flex; align-items: center; gap: 5px;
  font: inherit; font-size: 13px; color: inherit; opacity: .78;
  background: none; border: 0; cursor: pointer;
  padding: 7px 9px; border-radius: 8px; white-space: nowrap; transition: .15s;
}
.nav-more__btn:hover { opacity: 1; background: rgba(255, 255, 255, .06); }
.nav-more.is-open > .nav-more__btn { opacity: 1; color: var(--bh-cyan, #2DD4FF); background: rgba(45, 212, 255, .10); }
.nav-more__caret {
  width: 5px; height: 5px; margin-top: -3px;
  border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg); transition: transform .2s ease;
}
.nav-more.is-open .nav-more__caret { transform: rotate(-135deg); margin-top: 2px; }
.nav-more__panel {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 200px;
  padding: 8px; border-radius: 14px;
  background: rgba(13, 17, 24, .94);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(245, 247, 250, .12);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .48);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 40;
}
.nav-more.is-open .nav-more__panel { opacity: 1; visibility: visible; transform: none; }
.nav-more__panel a {
  display: block; padding: 9px 11px; border-radius: 9px;
  font-size: 13px; color: #C9CFD8; text-decoration: none; white-space: nowrap; transition: .14s;
}
.nav-more__panel a:hover { color: #fff; background: rgba(45, 212, 255, .12); }
.nav-more__panel a.is-active { color: var(--bh-cyan, #2DD4FF); background: rgba(45, 212, 255, .10); }

/* 学院手写页的 .topbar：按钮与链接视觉对齐 */
.topbar__links .nav-more__btn { color: var(--muted, #8B93A1); }
.topbar__links .nav-more__btn:hover { color: var(--text, #E7EBF3); }

/* 面包屑条：紧贴顶栏下方，属于内容区但视觉上与顶栏连成一体 */
.crumbbar { background: rgba(11,14,20,.96); border-bottom: 1px solid rgba(245,247,250,.06); }
.crumbbar__inner {
  max-width: 1280px; margin: 0 auto; padding: 9px 24px;
  font-size: 12px; color: #8B93A1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.crumbbar a { color: #A8B0BC; text-decoration: none; }
.crumbbar a:hover { color: var(--bh-cyan, #2DD4FF); }
.crumbbar b { color: #E7EBF3; font-weight: 600; }
.crumbbar span.sep { margin: 0 7px; opacity: .5; }

/* ---------- 页脚（完整版） ---------- */
.bf {
  --bf-ink: #0B0E14;
  --bf-paper: #F5F7FA;
  --bf-ember: #FF7A29;
  --bf-cyan: #2DD4FF;
  --bf-muted: #8B93A1;
  --bf-line: rgba(245, 247, 250, .12);
  background: var(--bf-ink);
  color: var(--bf-paper);
  border-top: 1px solid var(--bf-line);
  padding: 48px 24px 28px;
  margin-top: 64px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
.bf__inner { max-width: 1200px; margin: 0 auto; }
.bf__top { display: grid; grid-template-columns: 1.3fr 2.2fr; gap: 48px; padding-bottom: 36px; }
.bf__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.bf__brand img { display: block; border-radius: 9px; width: 38px; height: 38px; }
.bf__mark { width: 11px; height: 11px; border-radius: 50%; background: var(--bf-ember); box-shadow: 0 0 0 4px rgba(255,122,41,.18); }
.bf__word { font-weight: 700; font-size: 20px; letter-spacing: .01em; }
.bf__sub { font-size: 12px; color: var(--bf-muted); margin-left: 2px; }
.bf__tagline { color: var(--bf-muted); margin: 18px 0 0; font-size: 14px; max-width: 34ch; line-height: 1.7; }
.bf__vision {
  margin: 8px 0 0; font-size: 15px; letter-spacing: .02em;
  background: linear-gradient(100deg, var(--bf-ember), var(--bf-cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.bf__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.bf__group h4 {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bf-muted); margin: 0 0 12px; font-weight: 600;
}
.bf__group a { display: block; color: #C9CFD8; padding: 5px 0; font-size: 14px; text-decoration: none; transition: color .15s ease; }
.bf__group a:hover { color: var(--bf-ember); }
.bf__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border-top: 1px solid var(--bf-line); padding-top: 20px;
  color: var(--bf-muted); font-size: 13px;
}
.bf__legal { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.bf__filing { display: inline-flex; align-items: center; gap: 5px; color: inherit; font-size: 13px; text-decoration: none; transition: color .15s ease; }
.bf__filing img { display: block; border-radius: 2px; width: 14px; height: 14px; }
.bf__filing:hover { color: var(--bf-ember); }
.bf__slogan { color: var(--bf-ember); font-weight: 600; letter-spacing: .02em; white-space: nowrap; }

/* ---------- 页脚（简洁版：工具执行页 / 交互密集页） ---------- */
.bf--slim { padding: 28px 24px 22px; margin-top: 48px; }
.bf--slim .bf__inner { max-width: 1320px; }
.bf__slimrow {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px solid var(--bf-line);
}
.bf__slimbrand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; flex: none; }
.bf__slimbrand i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--bf-ember);
  box-shadow: 0 0 0 3px rgba(255,122,41,.18); display: block;
}
.bf__slimlinks { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.bf__slimlinks a {
  font-size: 12.5px; color: #A8B0BC; text-decoration: none;
  padding: 5px 9px; border-radius: 7px; transition: .15s;
}
.bf__slimlinks a:hover { color: var(--bf-cyan); background: rgba(45,212,255,.08); }
.bf__slimfoot {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 12px; font-size: 12px; color: var(--bf-muted);
}
.bf__slimfoot .bf__slogan { margin-left: auto; font-size: 12.5px; }

/* 宽栏页面（测评 / 工具箱内容 1320px）让导航与内容左边缘对齐 */
.bh-wide .bh__inner,
.bh-wide .crumbbar__inner { max-width: 1320px; }

/* 二级菜单不能被导航条的 overflow 裁掉：桌面放开来，窄屏把面板改成整宽浮层。
 * 注意 .topbar 上有 backdrop-filter，会成为 fixed 子元素的包含块 —— 面板的 left/right 相对它，
 * 视觉上仍是「顶栏下方整宽」，所以这里可以直接用 fixed。 */
.topbar__links { overflow: visible; }

@media (max-width: 1024px) {
  .bh__sub { display: none; }
}
@media (max-width: 900px) {
  .bh__nav { overflow-x: auto; scrollbar-width: none; }
  .bh__nav::-webkit-scrollbar { display: none; }
  .topbar__links { overflow-x: auto; scrollbar-width: none; }
  .topbar__links::-webkit-scrollbar { display: none; }
  .nav-more__panel { position: fixed; top: 66px; left: 12px; right: 12px; min-width: 0; }
}
@media (max-width: 900px) {
  .bh__cta { display: none; }
}
@media (max-width: 820px) {
  .bf { padding: 36px 20px 24px; margin-top: 44px; }
  .bf__top { grid-template-columns: 1fr; gap: 28px; }
  .bf__links { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .bf__bottom { flex-direction: column; align-items: flex-start; }
  .bf__slimlinks { margin-left: 0; }
  .bf__slimfoot .bf__slogan { margin-left: 0; }
}
