:root { --mast-height: var(--measured-mast-height, 66px); scroll-padding-top: var(--mast-height); }
.mast { position: sticky; top: 0; z-index: 20; background: #fffffff5; }
.mast.scrolled { box-shadow: 0 8px 22px -17px #18364d85; }
.mast-inner { position: relative; }
.drawer-trigger { display: none; }
.journey-track { scroll-margin-top: 0; }
.mast .features-nav { position: static; }
.features-nav summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  list-style: none;
  font-weight: 570;
  font-size: 14px;
  cursor: pointer;
}
.features-nav summary::-webkit-details-marker { display: none; }
.features-nav summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.features-nav[open] summary::after { transform: translateY(2px) rotate(225deg); }
.feature-menu {
  position: absolute; top: calc(100% + 5px); left: var(--pad);
  width: min(610px, calc(100% - var(--pad) * 2));
  display: grid; grid-template-columns: 1fr 1.08fr; overflow-y: auto;
  max-height: calc(100dvh - var(--mast-height) - 12px);
  padding: 8px; border: 1px solid var(--rule); border-radius: 13px;
  background: white; color: var(--ink); box-shadow: 0 17px 45px -19px #17334760;
}
.mast .feature-menu a { text-decoration: none; }
@media (scripting: none) {
  .mast .features-nav[open] .feature-menu { animation: none; }
}
.feature-menu a:hover,.feature-menu a:focus-visible { background: var(--brand-tint); }
.mast .feature-menu .menu-index { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 18px; gap: 26px; margin-right: 6px; border-radius: 8px; background: #e2edf2; color: var(--ink); }
.menu-index strong { font: 540 25px/1.1 var(--display); letter-spacing: -.035em; }
.menu-index small { font-weight: 500; font-size: 14px; }
.menu-links { display: grid; }
.resources-menu { gap: 8px; background: linear-gradient(120deg,#f3f8fa,#fff 65%,#fbf4ed); }
.resources-menu .menu-links { align-content: start; }
.mast .resources-menu .library-menu-link {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between;
  min-height: 44px; gap: 12px; padding: 8px 12px; border-radius: 6px;
  color: var(--brand-ink); background: #e5eff3; font-weight: 650;
}
.mast .resources-menu .library-menu-link:is(:hover, :focus-visible) { background: #d5e8ef; }
.resources-menu .menu-links > strong { color: var(--ink-3); padding: 10px 12px 3px; font-size: 12px; letter-spacing: .065em; text-transform: uppercase; }
@media(min-width:681px) {
  .mast .resources-nav { position: relative; }
  .resources-menu { width: min(510px, 74vw); left: 50%; translate: -50% 0; top: calc(100% + 8px); }
}
.mast .menu-links a { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 6px; gap: 10px; }
@media(max-width:680px) {
  :root { --mast-height: 0px; }
  .mast { position: relative; }
  .mast.scrolled { box-shadow: none; }
  .features-nav summary { font-size: 13px; }
  .feature-menu { left: 10px; width: calc(100% - 20px); grid-template-columns: 1fr; max-height: calc(100dvh - var(--measured-mast-height, 96px) - 12px); }
  .mast .feature-menu .menu-index { flex-direction: row; align-items: center; padding: 13px; gap: 6px; margin: 0 0 3px; }
  .menu-index strong { font-size: 19px; }
  .has-drawer .mast-inner {
    display: flex; align-items: center; gap: 12px; min-height: 58px; padding-block: 4px;
  }
  .has-drawer .mast-inner > nav { display: none; }
  .has-drawer .sign-in span { display: none; }
  .drawer-trigger, .drawer-close {
    display: grid; place-items: center; position: relative; width: 44px; height: 44px;
    padding: 0; border: 0; border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer;
  }
  .drawer-trigger span, .drawer-trigger::before, .drawer-trigger::after,
  .drawer-close::before, .drawer-close::after {
    content: ""; position: absolute; width: 21px; height: 2px; border-radius: 2px; background: currentColor;
  }
  .drawer-trigger::before { transform: translateY(-6px); }
  .drawer-trigger::after { transform: translateY(6px); }
  .drawer-close { background: rgb(255 255 255 / 64%); border: 1px solid rgb(23 38 64 / 12%); }
  .drawer-close::before { transform: rotate(45deg); }
  .drawer-close::after { transform: rotate(-45deg); }
  html:has(.mobile-drawer[open]) { overflow: hidden; }
  .mobile-drawer {
    position: fixed; inset: 0 0 0 auto; margin: 0; border: 0; border-inline-start: 1px solid var(--rule);
    width: min(365px, calc(100vw - 32px)); max-width: none; height: 100%; height: 100dvh; max-height: none;
    padding: max(14px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) 22px;
    color: var(--ink); overflow-y: auto; overscroll-behavior: contain;
    background: radial-gradient(ellipse at 110% 99%, #fbd5bf 0, transparent 46%),
      linear-gradient(154deg, #d5e7f4 0%, #f5f9fa 48%, #e4eef2 83%);
    box-shadow: -12px 0 44px rgb(23 38 64 / 14%);
  }
  .mobile-drawer::backdrop { background: rgb(14 33 52 / 38%); }
  .drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
  .mast .mobile-drawer nav {
    display: flex; flex-direction: column; align-items: stretch; justify-content: start;
    gap: 0; margin-block-start: clamp(32px, 7svh, 64px); border: 0;
  }
  .mast .mobile-drawer nav > a, .mobile-drawer .features-nav > summary {
    display: flex; align-items: center; justify-content: space-between; min-height: 62px;
    border-top: 1px solid rgb(23 38 64 / 16%); font: 540 clamp(23px, 6vw, 29px)/1.2 var(--display);
    letter-spacing: -.035em;
  }
  .mast .mobile-drawer nav > :last-child { border-bottom: 1px solid rgb(23 38 64 / 16%); }
  .mobile-drawer .features-nav summary::after { margin-inline-end: 4px; }
  .mobile-drawer .feature-menu {
    position: static; width: auto; max-height: none; padding: 0 0 12px 12px; border: 0; border-radius: 0;
    box-shadow: none; background: transparent;
  }
  .mast .mobile-drawer .feature-menu a {
    justify-content: flex-start; margin: 0; padding: 6px 10px; background: transparent;
    font-size: 15px; min-height: 44px;
  }
  .mobile-drawer .menu-index strong { font: inherit; }
  .mobile-drawer .menu-index small, .mobile-drawer .menu-links span { display: none; }
  @media (prefers-reduced-motion: no-preference) {
    .mobile-drawer[open] { animation: drawer-enter 200ms cubic-bezier(.18,.76,.26,1); }
    .mobile-drawer[open]::backdrop { animation: drawer-shade 180ms ease-out; }
  }
}
@keyframes drawer-enter { from { transform: translateX(100%); } }
@keyframes drawer-shade { from { opacity: 0; } }
