/* LAB 统一导航（2026-09-15 host 批：绿色页面共用，DLB 除外）。
   标记注入：scripts/build_nav.py；改结构去 scripts/nav_snippet.py。
   本档自包含——About 与 Directory 不载 tokens.css，颜色字体不能用 var() 引
   tokens，只能直写（对照：#142921=--court-deep、#f2edda=--cream、#b3924f=--gold）。
   字重只用各页都载得到的：Playfair 700、Inter 500（directory/about 没载 Inter 600）。 */

:root { --lab-nav-h: 72px; }

.lab-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #142921;
  color: #f2edda;
  border-bottom: 1px solid rgba(242, 237, 218, .14);
}
.lab-nav-in {
  max-width: 1120px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--lab-nav-h);
  padding-inline: 20px;
}
.lab-brand {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  letter-spacing: .04em;
  color: #f2edda;
  text-decoration: none;
  white-space: nowrap;
}
.lab-brand small {
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
  font-weight: 500;
  font-size: 9px;
  letter-spacing: .22em;
  color: #b3924f;
  margin-left: 8px;
  vertical-align: 2px;
}
.lab-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}
.lab-links a {
  position: relative;
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .02em;
  color: rgba(242, 237, 218, .82);
  text-decoration: none;
  padding: 10px 0;
}
.lab-links a:hover,
.lab-links a:focus-visible { color: #f2edda; }
.lab-links a[aria-current="page"] { color: #f2edda; }
/* 当前页：短金下划线（不通栏，贴字左缘） */
.lab-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 18px;
  height: 2px;
  background: #b3924f;
}
.lab-cta {
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
  font-weight: 500;
  font-size: 13.5px;
  color: #f2edda;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(242, 237, 218, .55);
  border-radius: 9999px;
  padding: 9px 18px;
  transition: background .2s, color .2s, border-color .2s;
}
.lab-cta:hover,
.lab-cta:focus-visible {
  background: #f2edda;
  color: #142921;
  border-color: #f2edda;
}

/* 锚点跳转（如 /events#ev-next）不被吸顶导航盖住 */
[id] { scroll-margin-top: calc(var(--lab-nav-h) + 12px); }

/* 手机：两行——LAB + CTA 一行、四链接均分一行（≥44px 点击区），不做抽屉。
   不吸顶（两行太占竖向空间），--lab-nav-h 归零让吸顶偏移
   （directory 的 .tools、about 的 .stage）自动跟着校正。 */
@media (max-width: 719px) {
  :root { --lab-nav-h: 0px; }
  .lab-nav { position: static; }
  .lab-nav-in {
    flex-wrap: wrap;
    gap: 0 16px;
    min-height: 0;
    padding: 12px 16px 4px;
  }
  .lab-brand { order: 1; }
  .lab-cta { order: 2; margin-left: auto; }
  .lab-links {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: 0;
  }
  .lab-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 8px;
  }
  .lab-links a[aria-current="page"]::after { left: 8px; bottom: 8px; }
}
