/* One balanced corner system across interior pages: tree home, R&K story, pinecone events. */
:root:root:root body header.site-nav:has(>.rk-about-link):has(>.global-events-tab) {
  position: relative !important;
  display: flex !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: clamp(8px, 1.1vw, 15px) !important;
  width: 100% !important;
  height: 64px !important;
  min-height: 64px !important;
  padding: 5px clamp(15px, 3vw, 40px) !important;
  box-sizing: border-box !important;
}

:root:root:root body header.site-nav:has(>.rk-about-link) > .brand.site-return-home {
  position: static !important;
  display: flex !important;
  flex: 0 0 70px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 70px !important;
  height: 52px !important;
  min-width: 70px !important;
  margin: 0 !important;
  transform: none !important;
}

:root:root:root body header.site-nav:has(>.rk-about-link) > .brand.site-return-home .site-return-tree {
  display: block !important;
  width: 70px !important;
  height: 50px !important;
  object-fit: contain !important;
  filter: brightness(1.04) saturate(.82) sepia(.08) !important;
}

:root:root:root body header.site-nav:has(>.rk-about-link) > .rk-about-link {
  position: static !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 48px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  transform: none !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(224, 202, 153, .52) !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #e6d2a1 !important;
  font: 600 14px/1 'EB Garamond', Georgia, serif !important;
  letter-spacing: .14em !important;
  text-decoration: none !important;
  text-shadow: none !important;
}

:root:root:root body header.site-nav:has(>.rk-about-link) > .global-events-tab {
  position: static !important;
  display: inline-flex !important;
  flex: 0 0 38px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 4px !important;
  transform: none !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(224, 202, 153, .52) !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root:root:root body header.site-nav:has(>.rk-about-link) > .global-events-tab img {
  display: block !important;
  width: 26px !important;
  height: 26px !important;
  object-fit: contain !important;
  filter: none !important;
}

:root:root:root body header.site-nav:has(>.rk-about-link) .global-events-label {
  display: none !important;
}

:root:root:root body header.site-nav:has(>.rk-about-link) > .navlinks {
  display: flex !important;
  flex: 0 1 auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: clamp(8px, 1.2vw, 18px) !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
}

:root:root:root body header.site-nav:has(>.rk-about-link) > .navlinks a {
  white-space: nowrap !important;
}

/* Keep the product rail's known first-screen height exact while sharing the same alignment. */
:root:root:root body.collection-home.shirt-page > header.site-nav:has(>.rk-about-link) {
  height: 56px !important;
  min-height: 56px !important;
  flex: 0 0 56px !important;
}

/* Ali's header uses a grouped logo/R&K lockup, aligned to the same baseline. */
:root:root:root body:has(.ali-page) header.landing-nav {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 13px !important;
  min-height: 70px !important;
  height: auto !important;
  padding: 5px clamp(15px, 3vw, 40px) !important;
}

:root:root:root body:has(.ali-page) .ali-brand-lockup {
  position: static !important;
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 7px !important;
  margin: 0 !important;
  transform: none !important;
}

:root:root:root body:has(.ali-page) .ali-brand-lockup > .brand {
  position: static !important;
  display: flex !important;
  width: 70px !important;
  height: 52px !important;
  margin: 0 !important;
  transform: none !important;
}

:root:root:root body:has(.ali-page) .ali-brand-lockup > .brand img {
  width: 70px !important;
  height: 50px !important;
  object-fit: contain !important;
  filter: brightness(1.04) saturate(.82) sepia(.08) !important;
}

:root:root:root body:has(.ali-page) .ali-brand-lockup > .rk-about-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 48px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  border-bottom: 1px solid rgba(135, 116, 76, .54) !important;
  color: #6b6049 !important;
  font: 600 14px/1 'EB Garamond', Georgia, serif !important;
  letter-spacing: .14em !important;
  text-decoration: none !important;
}

:root:root:root body:has(.ali-page) header.landing-nav > .global-events-tab {
  position: static !important;
  display: inline-flex !important;
  flex: 0 0 38px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 4px !important;
  transform: none !important;
  border-bottom: 1px solid rgba(135, 116, 76, .54) !important;
}

:root:root:root body:has(.ali-page) header.landing-nav > .global-events-tab img {
  width: 26px !important;
  height: 26px !important;
  object-fit: contain !important;
  filter: none !important;
}

:root:root:root body:has(.ali-page) .ali-top-context {
  margin: 0 0 0 auto !important;
}

:root:root:root body:has(.ali-page) header.landing-nav > .ali-top-links {
  margin: 0 0 0 auto !important;
}

/* Homepage retains its full watercolor wordmark. The corner pinecone means Events;
   the existing collection link remains a separate, unambiguous text action. */
:root:root:root body:has(.hero) .hero {
  isolation: isolate !important;
}

:root:root:root body:has(.hero) .hero > .scene {
  z-index: 0 !important;
}

:root:root:root body:has(.hero) .hero > .shade {
  z-index: 1 !important;
}

:root:root:root body:has(.hero) .hero > .home-brand-lockup,
:root:root:root body:has(.hero) .hero > .copy,
:root:root:root body:has(.hero) .hero > .hero-closing {
  z-index: 3 !important;
}

:root:root:root body:has(.hero) .hero::after {
  z-index: 4 !important;
}

:root:root:root body:has(.hero) .home-brand-lockup .brand-name-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
}

:root:root:root body:has(.hero) .home-events-link {
  display: inline-flex !important;
  flex: 0 0 25px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 25px !important;
  height: 24px !important;
  border-bottom: 1px solid rgba(230, 207, 153, .7) !important;
}

:root:root:root body:has(.hero) .home-events-link img {
  display: block !important;
  width: 21px !important;
  height: 21px !important;
  object-fit: contain !important;
  filter: none !important;
}

:root:root:root body:has(.hero) .home-brand-lockup .home-collection-link {
  justify-content: center !important;
  gap: 0 !important;
}

:root:root:root body:has(.hero) .home-brand-lockup .home-collection-pinecone {
  display: none !important;
}

@media (max-width: 760px) {
  :root:root:root body header.site-nav:has(>.rk-about-link):has(>.global-events-tab) {
    height: 58px !important;
    min-height: 58px !important;
    gap: 6px !important;
    padding: 3px 10px !important;
  }

  :root:root:root body header.site-nav:has(>.rk-about-link) > .brand.site-return-home {
    flex-basis: 58px !important;
    width: 58px !important;
    min-width: 58px !important;
    height: 48px !important;
  }

  :root:root:root body header.site-nav:has(>.rk-about-link) > .brand.site-return-home .site-return-tree {
    width: 58px !important;
    height: 46px !important;
  }

  :root:root:root body header.site-nav:has(>.rk-about-link) > .rk-about-link {
    min-width: 39px !important;
    min-height: 34px !important;
    padding: 3px 5px !important;
    font-size: 12px !important;
    letter-spacing: .1em !important;
  }

  :root:root:root body header.site-nav:has(>.rk-about-link) > .global-events-tab {
    flex-basis: 32px !important;
    width: 32px !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  :root:root:root body header.site-nav:has(>.rk-about-link) > .global-events-tab img {
    width: 23px !important;
    height: 23px !important;
  }

  :root:root:root body header.site-nav:has(>.rk-about-link) > .navlinks {
    gap: 7px !important;
    overflow-x: auto !important;
  }

  :root:root:root body header.site-nav:has(>.rk-about-link) > .navlinks a {
    font-size: 10px !important;
  }

  :root:root:root body.collection-home.shirt-page > header.site-nav:has(>.rk-about-link) {
    height: 50px !important;
    min-height: 50px !important;
    flex-basis: 50px !important;
  }

  :root:root:root body:has(.ali-page) header.landing-nav {
    min-height: 60px !important;
    gap: 5px !important;
    padding: 3px 10px !important;
  }

  :root:root:root body:has(.ali-page) .ali-brand-lockup {
    gap: 3px !important;
  }

  :root:root:root body:has(.ali-page) .ali-brand-lockup > .brand,
  :root:root:root body:has(.ali-page) .ali-brand-lockup > .brand img {
    width: 58px !important;
    min-width: 58px !important;
    height: 44px !important;
  }

  :root:root:root body:has(.ali-page) .ali-brand-lockup > .rk-about-link {
    min-width: 39px !important;
    min-height: 34px !important;
    padding: 3px 5px !important;
    font-size: 12px !important;
    letter-spacing: .1em !important;
  }

  :root:root:root body:has(.ali-page) header.landing-nav > .global-events-tab {
    flex-basis: 32px !important;
    width: 32px !important;
    height: 34px !important;
  }

  :root:root:root body:has(.ali-page) header.landing-nav > .global-events-tab img {
    width: 23px !important;
    height: 23px !important;
  }

  :root:root:root body:has(.ali-page) .ali-top-context {
    display: none !important;
  }
}
