.lab-header .lab-brand, .lab-home .lab-brand { font-family: Onest, Helvetica, sans-serif; font-weight: 500; letter-spacing: -.065em; color: #233c66; }
.brand-text { display: inline-block; }
.lab-header .nav-arrow { width: 14px; height: 14px; margin-top: 3px; }
.lab-home .brand-arrow { top: .05em; }
.lab-home .brand-arrow .nav-arrow { width: 17px; height: 17px; }
.lab-header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.identity-plate > div { display: inline-flex; align-items: baseline; }
.identity-plate svg { align-self: flex-start; margin-top: .16em; }
@media(max-width:620px) {
 .lab-header, .about-page .lab-header { height: 104px; padding: 15px 22px 14px; align-items: flex-start; }
 .lab-header nav, .about-page .lab-header nav { position: absolute; left: 22px; right: 22px; bottom: 15px; display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 10px; font: 400 13px/1.4 Onest, sans-serif; }
 .lab-header .lab-brand { font-size: 21px; }
 .lab-article, .project-page, .subpage, .directory-page { padding-top: 104px; }
}
.directory-page, .directory-page .lab-header { background: #f4f3ee; }

/* Corner logo: the repeated-gradient pixel CHS mark and square arrow. */
.lab-header .lab-brand { display: inline-flex; align-items: baseline; gap: 0; font: 500 32px/1 Onest, Helvetica, sans-serif; letter-spacing: -.01em; color: #233c66; }
.lab-header .lab-brand .corner-logo { display: block; width: auto; height: .875em; }
.lab-header .lab-brand .b-c { display: inline-block; }
.lab-header .lab-brand .brand-h { color: #a9c4d2; }
.lab-header .lab-brand .nav-arrow { width: .36em; height: .36em; margin: .02em 0 0 .1em; align-self: flex-start; fill: currentColor; }
@media (max-width: 620px) { .lab-header .lab-brand { font-size: 26px; } }

/* Page to page: the corner logo stays put between subpages (same name, same spot, so nothing moves). To and
   from the homepage nothing glides: the old page fades away and the new one, corner logo included, comes in
   as a whole. Cross-document view transitions; browsers without them just swap. */
@view-transition { navigation: auto; }
.lab-header .lab-brand { view-transition-name: cohese-mark; }
.lab-header nav { view-transition-name: site-nav; }

/* only one side has a corner logo (home and back): it leaves and arrives with the page, not on its own */
::view-transition-old(cohese-mark):only-child { animation: vt-out .22s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(cohese-mark):only-child { animation: vt-in .45s cubic-bezier(0, 0, .2, 1) .18s both; }

/* the page itself: out quickly, then in with a small rise */
::view-transition-old(root) { animation: vt-out .22s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in .45s cubic-bezier(0, 0, .2, 1) .18s both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

.lab-header .lab-brand .nav-arrow { transition: transform .25s ease; }
.lab-header .lab-brand:hover .nav-arrow { transform: translate(2px, -2px); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Header: solid white; once content scrolls under it a soft fade appears below it, and it tucks away after a
   long scroll down (chrome.js). */
.lab-header, .article-header, .lab-article .article-header { background: #fff; border-bottom: 0; box-shadow: none; transition: transform .5s cubic-bezier(.3, .7, .2, 1); }
.lab-header::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 18px; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: linear-gradient(#fff, rgba(255, 255, 255, 0)); }
.lab-header.scrolled::after { opacity: 1; }
.lab-header.tucked { transform: translateY(calc(-100% - 20px)); }
@media (prefers-reduced-motion: reduce) { .lab-header { transition: none; } }
