Measurements of the imprint of inflationary gravity waves on the cosmic microwave background radiation are currently limited by uncertainty in the properties of polarized galactic dust. A balloon-borne platform probing frequency bands that are not accessible from the ground is uniquely suited to drastically reduce this uncertainty. We propose EBEX-IDS, a long-duration balloon-borne experiment that will measure the polarization of galactic dust at 360~GHz with 36 times lower power spectrum noise, compared to the Planck satellite. With 20,562 detectors, spread over 7 frequency bands between 150 and 360~GHz, including bands at 280, 320, and 360~GHz, EBEX-IDS will determine the spectral index of polarized dust emission and its B-mode power spectrum at 150~GHz with an unprecedented accuracy of 0.04% and signal-to-noise ratio (SNR) of 42, respectively. The multitude of independent bands will precisely determine the shape of the dust spectral energy distribution at the frequency bands that are most relevant for the extraction of the inflationary signal. By combining observations and sharing data with the ground-based BICEP/Keck Array and Polarbear/Simons Array instruments the three experiments will give a map depth in the BICEP2 region of less than 1 microK arcmin, the deepest map yet produced compared to any other sky region. With this depth and using the the EBEX-IDS data to provide the crucial leverage on the properties of dust emission, the combined data will place a 2 sigma upper limit of r<0.003 on the telltale signature of inflation after accounting for dust separation. This limit is a factor of 30 more stringent than current limits using CMB data. The limit using the EBEX-IDS data alone will be r<0.008. With resolution higher than other balloon payloads EBEX-IDS will map the CMB lensing deflection angle, improve the determination the lensing power spectrum by a factor of 8, and will constrain the sum of neutrino mass by nearly a factor of 2 compared to current limits. At 360~GHz EBEX-IDS is six times more sensitive than Planck to the signals due to the cosmic infrared background and it adds comparable sensitivity in 4 additional bands that Planck does not have. EBEX-IDS will advance the state of readiness of satellite-worthy technologies by pioneering a balloon-borne focal plane consisting of sinuous antenna multichroic pixels (SAMPs). This focal plane leverages the already-funded development of focal planes with SAMPs for STP3G, Polarbear-2, and Simons Array, but EBEX-IDS will implement pixels at higher frequencies and optimized for a space-like environment. We will use a new readout system that multiplexes 64 readout channels onto two wires, a factor of 4 larger than has been used to date. EBEX-IDS is the only balloon platform proposed to elevate the readiness level of these technologies, which are baselined for LiteBIRD, a CMB satellite mission that is now in Phase-A study both by NASA and JAXA. Investing in EBEX-IDS mitigates balloon-flight risks, and is cost-effective for NASA, because it will re-use flight-tested hardware, designs, and techniques from a predecessor experiment, EBEX2013. The experiment will be fielded by the team that in 2009 pioneered the use of TES bolometers read out with SQUID amplifiers on a balloon flight, and in 2012 was the first to conduct balloon-borne cosmological observations with a kilo-pixel array using this technology. The EBEX team was the first to implement a digital frequency-domain readout system that has now been adopted by several ground-based experiments, and we pioneered and demonstrated a successful implementation of a superconducting magnetic bearing for astrophysical polarimetry. The proposed effort will be carried out primarily by graduate students overseen by postdoctoral scholars, thereby contributing to NASA educational STEM goals.