.home-research {
  background: #ae3e06;
  color: #fff;
  font: 500 16px/1.4 "Zilla Slab", Georgia, serif;
}

.home-research__width {
  container-type: inline-size;
  margin-inline: auto;
  max-width: 1440px;
}

.home-research__stage,
.home-research__controls {
  --u: calc(100cqw / 1440);
  --inset: 96;
  --title: 52;
  --title-leading: 60;
  --body: 19;
  --body-leading: 26;
  --copy-gap: 24;
  --body-min: 104;
  --resource-size: 18;
  --resource-leading: 27;
  --resource-gap: 24.65;
  --tab-padding: 10;
  --tab-gap: 8;
  --tab-top: 9;
  --tab-bottom: 57;
  box-sizing: border-box;
}

.home-research__stage {
  display: grid;
  grid-template-columns: minmax(0, calc(550 * var(--u))) minmax(0, 1fr);
  grid-template-rows: minmax(calc(271 * var(--u)), max-content) minmax(calc(217 * var(--u)), auto);
  column-gap: calc(46 * var(--u));
  align-content: start;
  min-height: calc(568 * var(--u));
  padding: calc(64 * var(--u)) calc(var(--inset) * var(--u)) calc(16 * var(--u));
}

/* Shared tracks keep the art, controls and bottom edge fixed across the three texts. */
.home-research__slide {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 1 / 3;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
  min-width: 0;
  margin: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.home-research__stage:not([data-ready]):not(:has(.home-research__slide:target)) > :first-child,
.home-research__stage:not([data-ready]) > .home-research__slide:target,
.home-research__slide[data-active] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.home-research__stage[data-ready] .home-research__slide {
  transition: opacity 280ms ease-out, visibility 0s linear 280ms;
}

.home-research__stage[data-ready] .home-research__slide[data-active] {
  transition-delay: 0s;
}

.home-research__copy {
  grid-area: 1 / 1;
  align-self: start;
  min-width: 0;
}

.home-research__copy h2,
.home-research__copy p {
  margin: 0;
  color: inherit;
  letter-spacing: normal;
  text-align: left;
}

.home-research__copy h2 {
  font: 500 calc(var(--title) * var(--u))/calc(var(--title-leading) * var(--u)) "Fira Sans Condensed", sans-serif;
}

.home-research__copy p {
  min-height: calc(var(--body-min) * var(--u));
  margin-top: calc(var(--copy-gap) * var(--u));
  font: 500 calc(var(--body) * var(--u))/calc(var(--body-leading) * var(--u)) "Zilla Slab", Georgia, serif;
  transform: translateY(1px);
}

.home-research__resources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px calc(var(--resource-gap) * var(--u));
  margin-top: calc(16 * var(--u));
  font: 500 calc(var(--resource-size) * var(--u))/calc(var(--resource-leading) * var(--u)) "Zilla Slab", Georgia, serif;
  transform: translateY(1px);
}

.home-research__resources a,
.home-research__tabs a {
  color: inherit;
}

.home-research__resources a {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.home-research a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.home-research__evolution {
  position: relative;
  display: block;
  grid-area: 2 / 1;
  align-self: start;
  width: min(100%, calc(530 * var(--u)));
  aspect-ratio: 530 / 165.195;
}

.home-research__evolution img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: auto;
}

.home-research__figure {
  display: block;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  aspect-ratio: 652 / 487.8844;
  width: 100%;
  overflow: hidden;
  border-radius: calc(6 * var(--u));
  background: #fff;
}

.home-research__figure picture,
.home-research__figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-research__controls {
  margin-inline: calc(var(--inset) * var(--u));
  padding: calc(var(--tab-top) * var(--u)) 0 calc(var(--tab-bottom) * var(--u));
  border-top: 1px solid rgb(255 255 255 / 32%);
}

.home-research__tabs {
  position: relative;
  display: flex;
  width: max-content;
  max-width: calc(100% + var(--tab-padding) * var(--u));
  margin-left: calc(-1 * var(--tab-padding) * var(--u));
  gap: calc(var(--tab-gap) * var(--u));
  font: 500 calc(18 * var(--u))/calc(24 * var(--u)) "Zilla Slab", Georgia, serif;
}

.home-research__tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: calc(44 * var(--u));
  padding-inline: calc(var(--tab-padding) * var(--u));
  text-decoration: none;
  white-space: nowrap;
}

.home-research__tabs a[aria-selected="false"] {
  opacity: 0.88;
}

.home-research__tabs a span {
  transform: translateY(calc(-2 * var(--u)));
}

.home-research__indicator {
  position: absolute;
  top: calc(35 * var(--u));
  left: 0;
  width: var(--indicator-width, calc(130 * var(--u)));
  height: max(1.5px, calc(2 * var(--u)));
  background: #fff;
  transform: translateX(var(--indicator-x, calc(var(--tab-padding) * var(--u))));
  pointer-events: none;
}

.home-research__tabs[data-measured] .home-research__indicator {
  transition: transform 280ms ease-out, width 280ms ease-out;
}

@media (min-width: 1024px) {
  .home-research__tabs {
    display: grid;
    grid-template-columns: calc(150 * var(--u)) calc(97 * var(--u)) calc(60 * var(--u));
  }
  .home-research__tabs a { justify-content: flex-start; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .home-research__stage,
  .home-research__controls {
    --u: calc(100cqw / 1024);
    --inset: 32;
    --title: 44;
    --title-leading: 50;
    --body: 17;
    --body-leading: 23;
    --copy-gap: 21;
    --body-min: 115;
    --resource-size: 16;
    --resource-leading: 24;
    --tab-top: 11;
    --tab-bottom: 44;
  }

  .home-research__stage {
    grid-template-columns: minmax(0, calc(421 * var(--u))) minmax(0, 1fr);
    grid-template-rows: minmax(calc(265 * var(--u)), max-content) auto;
    column-gap: calc(23 * var(--u));
    min-height: calc(458 * var(--u));
    padding-top: calc(48 * var(--u));
  }

  .home-research__evolution { width: min(100%, calc(413 * var(--u))); }
}

@media (min-width: 790px) and (max-width: 1023px) {
  .home-research__stage,
  .home-research__controls {
    --u: calc(100cqw / 960);
    --inset: 40;
    --title: 40;
    --title-leading: 46;
    --body: 18;
    --body-leading: 24;
    --copy-gap: 20;
    --body-min: 0;
    --resource-size: 17;
    --resource-leading: 24;
    --resource-gap: 22;
    --tab-padding: 8;
    --tab-bottom: 28;
  }

  .home-research__stage {
    grid-template-columns: minmax(0, calc(388 * var(--u))) minmax(0, 1fr);
    grid-template-rows: minmax(calc(268 * var(--u)), max-content) auto;
    column-gap: calc(32 * var(--u));
    min-height: calc(430 * var(--u));
    padding-top: calc(40 * var(--u));
  }

  .home-research__copy { margin-top: calc(-4 * var(--u)); }
  .home-research__evolution { width: min(100%, calc(304 * var(--u))); }
}

@media (min-width: 600px) and (max-width: 789px) {
  .home-research__stage,
  .home-research__controls {
    --u: calc(100cqw / 626);
    --inset: 28;
    --title: 40;
    --title-leading: 46;
    --body: 18;
    --body-leading: 24;
    --copy-gap: 16;
    --body-min: 0;
    --resource-size: 17;
    --resource-leading: 24;
    --resource-gap: 22;
    --tab-padding: 8;
    --tab-bottom: 13;
  }

  .home-research__stage {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: minmax(calc(213 * var(--u)), max-content) auto auto;
    min-height: calc(788 * var(--u));
    padding-top: calc(28 * var(--u));
  }

  .home-research__slide { grid-row: 1 / 4; }
  .home-research__figure { grid-area: 2 / 1; }
  .home-research__evolution {
    grid-area: 3 / 1;
    width: min(100%, calc(252 * var(--u)));
    margin-top: calc(22 * var(--u));
  }
}

@media (max-width: 599px) {
  .home-research__stage,
  .home-research__controls {
    --u: 1px;
    --inset: 12;
    --title: 32;
    --title-leading: 39;
    --body: 19;
    --body-leading: 26;
    --copy-gap: 8;
    --body-min: 0;
    --resource-size: 16;
    --resource-leading: 23;
    --resource-gap: 12;
    --tab-padding: 7;
  }

  .home-research__stage {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: max-content max-content minmax(170px, 1fr);
    /* A definite stage gives the flexible figure track its remaining height.
       Wrapped copy and the figure's minimum can still expand the stage. */
    height: 772.18px;
    min-height: min-content;
    padding: 28px 12px 14px;
    column-gap: 0;
  }

  .home-research__slide { grid-row: 1 / 4; }
  .home-research__copy { padding-inline: 12px; }
  .home-research__copy h2,
  .home-research__copy p { transform: translateY(.5px); }
  .home-research__resources {
    min-height: 44px;
    margin-top: 8px;
  }
  .home-research__resources a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    text-decoration: none;
    /* Auto-sized labels in the phone master occupy whole CSS pixels. */
    inline-size: calc-size(max-content, round(up, size, 1px));
  }
  .home-research__resources a > span {
    text-decoration: underline;
    text-decoration-thickness: from-font;
    text-underline-position: from-font;
    text-underline-offset: auto;
    text-decoration-skip-ink: auto;
    text-decoration-color: var(--white);
  }
  .home-research__evolution {
    grid-area: 2 / 1;
    justify-self: center;
    width: min(100%, 262px);
    aspect-ratio: 262 / 81.346;
    margin-top: 14px;
  }
  .home-research__figure {
    position: relative;
    grid-area: 3 / 1;
    align-self: stretch;
    aspect-ratio: auto;
    margin-top: 9.65px;
  }
  .home-research__figure > :first-child { position: absolute; inset: 0; }
  #research-bagel-robotics-1 .home-research__figure { background: transparent; }
  .home-research__controls {
    border: 0;
    padding: 0 0 28px;
  }
  .home-research__tabs {
    display: grid;
    grid-template-columns: 130px 82px 57px;
    max-width: 100%;
    margin-inline: auto;
    left: -5.5px;
    gap: 11px;
    font-size: 16px;
    line-height: 22px;
  }
  .home-research__tabs a {
    justify-content: flex-start;
    min-height: 44px;
    opacity: 1;
  }
  .home-research__tabs a span { transform: translateY(-3px); }
  .home-research__tabs a[aria-selected="false"] { opacity: 1; }
  .home-research__indicator {
    width: var(--indicator-width, 115px);
    translate: 0 -.5px;
  }
}

@media (max-width: 319px) {
  .home-research__stage {
    grid-template-rows: max-content max-content minmax(105px, 1fr);
  }
  .home-research__tabs {
    width: 100%;
    grid-template-columns: auto auto auto;
    left: 0;
    gap: 0;
    font-size: clamp(14px, 5.4vw, 16px);
  }
  .home-research__tabs a { min-width: 0; padding-inline: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-research__stage[data-ready] .home-research__slide,
  .home-research__tabs[data-measured] .home-research__indicator {
    transition: none;
  }
}

.mobile-type-library, .mobile-type-paint { display: none; }
@media screen and (max-width: 599px) and (forced-colors: none) {
  .mobile-type-library {
    display: block;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .mobile-type-ready .mobile-type-host { position: relative; }
  .mobile-type-ready:not(.mobile-type-selection) .mobile-type-paint {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }
  .mobile-type-ready:not(.mobile-type-selection) [data-mobile-type-painted] {
    -webkit-text-fill-color: transparent;
  }
  .mobile-type-ready .home-research__copy h2,
  .mobile-type-ready .home-research__copy p,
  .mobile-type-ready .home-research__resources { transform: none; }
  .mobile-type-ready .home-research__tabs a span { transform: translateY(-4px); }
}
