/* Shared page chrome — lab.html / cognition.html aligned with React SiteNav. */
:root {
  --page-max: 1480px;
  --page-pad: 64px;
  --topbar-pad-y: 18px;
  --nav-gap: 22px;
  --nav-font: 14px;
}

.site-chrome {
  width: 100%;
  border-bottom: 1px solid #ffffff0c;
}

.wrap {
  width: min(var(--page-max), calc(100% - var(--page-pad)));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--page-max), calc(100% - var(--page-pad)));
  margin: 0 auto;
  padding: var(--topbar-pad-y) 0;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  flex-shrink: 0;
  z-index: 2;
}

.brand-mark {
  width: 32px;
  height: 32px;
  position: relative;
  transform: rotate(-12deg);
  flex-shrink: 0;
}
.brand-mark:before,
.brand-mark:after {
  content: "";
  position: absolute;
  width: 9px;
  border-radius: 3px;
  background: var(--lime, #c6f56b);
}
.brand-mark:before {
  height: 23px;
  left: 4px;
  top: 8px;
}
.brand-mark:after {
  height: 31px;
  left: 18px;
  top: 0;
}

.mark {
  width: 32px;
  height: 32px;
  display: flex;
  gap: 5px;
  align-items: flex-end;
  transform: rotate(-12deg);
  flex-shrink: 0;
}
.mark i {
  display: block;
  width: 9px;
  height: 22px;
  background: var(--lime, #c6f56b);
  border-radius: 3px;
}
.mark i:last-child {
  height: 31px;
}

.nav,
.topnav {
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
  color: var(--muted, #a0b0be);
  font-size: var(--nav-font);
  min-width: 0;
  margin-left: auto;
}
.nav a:hover,
.topnav a:hover {
  color: var(--text, #edf3f6);
}
.nav a.active,
.topnav a.active {
  color: var(--lime, #c6f56b) !important;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid var(--line, #28343f);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted, #a0b0be);
  white-space: nowrap;
}
.pill i,
.pill .dot {
  width: 6px;
  height: 6px;
  background: var(--lime, #c6f56b);
  border-radius: 50%;
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  z-index: 2;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--line, #28343f);
  border-radius: 999px;
  background: #0f171fcc;
  color: var(--text, #edf3f6);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  min-height: 0;
}

#navLoginBtn {
  background: linear-gradient(135deg, #c6f56b, #9be07a);
  color: #0a1208;
  border: 0;
  font-weight: 750;
}
#navLoginBtn.is-authed {
  background: #0f171fcc;
  color: var(--text, #edf3f6);
  border: 1px solid var(--line, #28343f);
  font-weight: 650;
}

#dirOpenBtn {
  display: none;
}

.dir-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #04070ccc;
  backdrop-filter: blur(6px);
  justify-content: flex-end;
  padding: 12px;
}
.dir-overlay.open {
  display: flex;
}
.dir-drawer {
  width: min(100%, 360px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid var(--line, #28343f);
  border-radius: 18px;
  background: #0c1218;
  padding: 18px 16px 28px;
}
.dir-drawer h2 {
  margin: 0 0 14px;
  font-size: 20px;
}
.dir-drawer a {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: #ffffff06;
  border: 1px solid transparent;
}
.dir-drawer a strong {
  font-size: 15px;
}
.dir-drawer a span {
  font-size: 12px;
  color: var(--muted, #a0b0be);
}
.dir-drawer a.active {
  border-color: #c6f56b44;
  background: #c6f56b12;
}
.dir-drawer a.active strong {
  color: var(--lime, #c6f56b);
}
.dir-close {
  float: right;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line, #28343f);
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #a0b0be);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

@media (max-width: 980px) {
  .topbar .pill {
    display: none;
  }
  .nav,
  .topnav {
    gap: 14px;
    font-size: 13px;
  }
}

@media (max-width: 820px) {
  :root {
    --page-pad: 40px;
    --topbar-pad-y: 14px;
  }
  .nav,
  .topnav {
    display: none;
  }
  .nav-actions {
    margin-left: auto;
  }
  #dirOpenBtn {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  :root {
    --page-pad: 28px;
  }
}
