/* Top menu. Fixed above the content column, beside the profile sidebar. All rules are scoped to #topnav
   and use !important where the theme's global link, list and button styles would otherwise leak in. */
#topnav { position: fixed; top: 0; left: 0; right: 23em; height: 48px; z-index: 10003; box-sizing: border-box;
          background: #fff; border-bottom: 1px solid #e3e3e3; }
@media screen and (max-width: 1680px) { #topnav { right: 21em; } }
@media screen and (max-width: 1280px) { #topnav { right: 20em; } }
@media screen and (max-width: 1024px) { #topnav { right: 0; } }
#wrapper { padding-top: 48px !important; }
html { scroll-padding-top: 64px; }

#topnav ul, #topnav li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
#topnav a { display: block; color: #333 !important; border: 0 !important; text-decoration: none !important;
            font-size: 15px; font-weight: 700; line-height: 48px; padding: 0 .85rem; white-space: nowrap;
            letter-spacing: 0; text-transform: none; cursor: pointer; }
#topnav .tn-list { display: flex; align-items: stretch; height: 48px; padding: 0 .6rem !important; }
#topnav .tn-item { position: relative; }
#topnav .tn-item.active > a:not(.tn-cta), #topnav .tn-item > a:not(.tn-cta):hover { color: #1f7a63 !important; box-shadow: inset 0 -3px 0 #4acaa8; }
#topnav .tn-caret { display: inline-block; width: 0; height: 0; margin-left: 4px; vertical-align: middle;
                    border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }
#topnav .tn-toggle { display: none; }

#topnav .tn-sub { display: none; position: absolute; top: 48px; left: 0; min-width: 18rem; background: #fff;
                  border: 1px solid #e3e3e3; border-top: 0; box-shadow: 0 10px 20px rgba(0,0,0,.12); padding: .4rem 0 !important; }
#topnav .tn-item:nth-last-child(-n+2) > .tn-sub { left: auto; right: 0; }
#topnav .tn-sub a { font-weight: 400; line-height: 1.35; padding: .6rem 1.1rem; white-space: normal; box-shadow: none !important; }
#topnav .tn-sub a.tn-bold { font-weight: 700; }
#topnav .tn-sub a:hover { background: #f1faf7; color: #1f7a63 !important; }
#topnav .tn-item.open > .tn-sub { display: block; }
@media (hover: hover) and (min-width: 1201px) { #topnav .tn-item:hover > .tn-sub { display: block; } }

#topnav a.tn-cta { background: #4acaa8; color: #fff !important; border-radius: 4px; line-height: 32px; margin: 8px .5rem; padding: 0 .9rem; }
#topnav a.tn-cta:hover { background: #38b895; }
#topnav .tn-pill { display: inline-block; margin-left: 6px; padding: 0 7px; font-size: 10px; line-height: 17px; font-weight: 700;
                   background: #fff; color: #1f7a63; border-radius: 9px; vertical-align: middle; }

/* Narrow screens: one "Menu" button; items stack, sub-menus open in place */
@media screen and (max-width: 1200px) {
  #topnav .tn-toggle { display: block; height: 48px; }
  #topnav .tn-list { display: none; position: absolute; top: 47px; left: 0; right: 0; height: auto; flex-direction: column;
                     background: #fff; border-bottom: 1px solid #e3e3e3; box-shadow: 0 10px 20px rgba(0,0,0,.12);
                     max-height: calc(100vh - 60px); overflow-y: auto; padding: .3rem 0 !important; }
  #topnav.open .tn-list { display: flex; }
  #topnav .tn-item > a { line-height: 44px; padding: 0 1.2rem; }
  #topnav .tn-sub { position: static; min-width: 0; border: 0; box-shadow: none; background: #f7fbfa; padding: 0 !important; }
  #topnav .tn-sub a { padding: .55rem 2rem; }
  #topnav .tn-item:nth-last-child(-n+2) > .tn-sub { right: auto; }
  #topnav a.tn-cta { display: inline-block; margin: 6px 1.2rem; }
}

/* The menu now sits at the top, so keep the profile block together instead of pushing it apart */
#header { justify-content: flex-start !important; }
