#crm-continuation .journey-benefits > li::before {
  content: none;
}

#crm-continuation > .journey-crm-link + .journey-walkthrough,
#crm-continuation > .journey-walkthrough + .journey-capture {
  margin-block-start: var(--homepage-section-gap);
}

#crm-continuation > .journey-walkthrough[data-walkthrough-motion]:not([data-walkthrough-compact]) {
  --walkthrough-entrance-space: max(var(--walkthrough-backdrop-inset),
    (100vh - var(--walkthrough-pin-top) - var(--walkthrough-backdrop-height)) / 2);
  margin-block-start: max(1.25rem, calc(var(--homepage-section-gap) - var(--walkthrough-entrance-space)));
}

#crm-continuation > .journey-walkthrough[data-walkthrough-motion]:not([data-walkthrough-compact]) + .journey-capture {
  margin-block-start: clamp(1.25rem, 2.4vw, 2.5rem);
}

@media (width >= 1024px) {
  #crm-continuation .journey-crm-copy > p {
    max-inline-size: 55ch;
    text-wrap: pretty;
  }

  #crm-continuation .journey-benefits > .journey-benefit-contacts {
    --scene-1x: url('/shared/home-cards/01-kontakter-miljo-1x.webp');
    --scene-2x: url('/shared/home-cards/01-kontakter-miljo.webp');
    --scene-position: right 68%;
    --scene-size: 107% auto;
    --scene-fade: linear-gradient(90deg, #ffffffa6, #ffffff80 38%, transparent 52%);
    min-block-size: clamp(11.5rem, 15.7vw, 14.125rem);
  }

  #crm-continuation .journey-benefits > li {
    --scene-position: center bottom;
    --scene-size: auto calc(100% + 40px);
    --scene-fade-start: 50%;
    --scene-fade: linear-gradient(180deg, transparent var(--scene-fade-start), #ffffff9e 67%, #ffffffb8);
    background: #e4ecf3;
  }

  #crm-continuation .journey-benefits > li::before {
    --scene-file: var(--scene-1x);
    content: '';
    pointer-events: none;
    opacity: 1;
    transition: none;
    background: var(--scene-fade), var(--scene-file) var(--scene-position) / var(--scene-size) no-repeat;
  }

  #crm-continuation .journey-benefit-contacts .journey-contact-flow::before,
  #crm-continuation .journey-contact-flow > *,
  #crm-continuation .journey-benefit-visual > * {
    visibility: hidden;
  }

  #crm-continuation .journey-benefits > [data-crm-benefit="notes"] {
    --scene-1x: url('/shared/home-cards/02-motesanteckningar-miljo-1x.webp');
    --scene-2x: url('/shared/home-cards/02-motesanteckningar-miljo-2x.webp');
  }
  #crm-continuation .journey-benefits > [data-crm-benefit="next"] {
    --scene-1x: url('/shared/home-cards/03-nasta-steg-miljo-1x.webp');
    --scene-2x: url('/shared/home-cards/03-nasta-steg-miljo-2x.webp');
    --scene-size: auto calc(100% + 20px);
  }
  #crm-continuation .journey-benefits > [data-crm-benefit="story"] {
    --scene-1x: url('/shared/home-cards/04-affarens-story-miljo-1x.webp');
    --scene-2x: url('/shared/home-cards/04-affarens-story-miljo-2x.webp');
  }
  #crm-continuation .journey-benefit-visual { background: none; }
  #crm-continuation .journey-benefit-copy :is(h3, p) { color: #0e2638; }
}

@media (width >= 1024px) and (min-resolution: 1.5dppx) {
  #crm-continuation .journey-benefits > li::before {
    --scene-file: var(--scene-2x);
    filter: blur(.45px);
  }
}

@media (1024px <= width < 1280px) {
  #crm-continuation .journey-benefit-visual { min-height: 9.125rem; }
  #crm-continuation .journey-benefits > .journey-benefit-contacts {
    --scene-position: right 52%;
    --scene-size: 105% auto;
  }
  #crm-continuation .journey-benefits > [data-crm-benefit="notes"] {
    --scene-1x: url('/shared/home-cards/02-motesanteckningar-smal-1x.webp');
    --scene-2x: url('/shared/home-cards/02-motesanteckningar-smal-2x.webp');
  }
  #crm-continuation .journey-benefits > [data-crm-benefit="next"] {
    --scene-1x: url('/shared/home-cards/03-nasta-steg-smal-1x.webp');
    --scene-2x: url('/shared/home-cards/03-nasta-steg-smal-2x.webp');
  }
  #crm-continuation .journey-benefits > [data-crm-benefit="story"] {
    --scene-1x: url('/shared/home-cards/04-affarens-story-smal-1x.webp');
    --scene-2x: url('/shared/home-cards/04-affarens-story-smal-2x.webp');
  }
  #crm-continuation .journey-benefits > li:not(.journey-benefit-contacts) {
    --scene-size: cover;
    --scene-position: center 75%;
    --scene-fade-start: 47%;
  }
  #crm-continuation .journey-benefits > li:is([data-crm-benefit="notes"], [data-crm-benefit="next"]) {
    --scene-position: center 54%;
  }
}

@media (width < 1024px) {
  #crm-continuation .journey-benefits { grid-template-columns: minmax(0, 1fr); }

  #crm-continuation .journey-benefits > li {
    display: flex;
    align-items: stretch;
    grid-column: auto;
    min-height: 0;
    gap: 0;
    padding: 0;
    background: #edf2f7;
  }

  #crm-continuation [data-crm-benefit="contacts"] {
    --scene: image-set(url('/shared/home-cards/01-kontakter-miljo-1x.webp') 1x, url('/shared/home-cards/01-kontakter-miljo.webp') 2x);
    --scene-position: right 53%;
    --scene-size: auto 132%;
  }

  #crm-continuation [data-crm-benefit="notes"] {
    --scene: image-set(url('/shared/home-cards/02-motesanteckningar-miljo-1x.webp') 1x, url('/shared/home-cards/02-motesanteckningar-miljo-2x.webp') 2x);
    --scene-position: center 26%;
  }

  #crm-continuation [data-crm-benefit="next"] {
    --scene: image-set(url('/shared/home-cards/03-nasta-steg-miljo-1x.webp') 1x, url('/shared/home-cards/03-nasta-steg-miljo-2x.webp') 2x);
  }

  #crm-continuation [data-crm-benefit="story"] {
    --scene: image-set(url('/shared/home-cards/04-affarens-story-miljo-1x.webp') 1x, url('/shared/home-cards/04-affarens-story-miljo-2x.webp') 2x);
    --scene-position: center 25%;
  }

  #crm-continuation .journey-benefits > li::before {
    content: '';
    position: static;
    z-index: 0;
    display: block;
    flex: none;
    aspect-ratio: 2.12;
    opacity: 1;
    background: linear-gradient(180deg, transparent 91%, #edf2f7),
      var(--scene) var(--scene-position, center 20%) / var(--scene-size, cover) no-repeat;
  }

  #crm-continuation .journey-benefit-copy { padding: clamp(1.05rem, 3vw, 1.35rem); }
  #crm-continuation :is(.journey-contact-flow, .journey-benefit-visual) { display: none; }
}

@media (560px <= width < 1024px) {
  #crm-continuation .journey-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
