.dmp-franchise-milestones {
  --timeline-red: #dc3f37;
  padding: 30px max(18px, calc((100vw - 1020px) / 2)) 58px;
  border-top: 0;
  border-bottom: 12px solid #ffbf23;
  background: #fff;
  color: var(--timeline-red);
}

.dmp-franchise-milestones > h2 {
  margin: 0;
  color: var(--timeline-red);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.dmp-milestone-heading-line {
  display: block;
  width: min(360px, 55%);
  height: 3px;
  margin: 10px auto 18px;
  background: linear-gradient(90deg, transparent, var(--timeline-red) 18%, var(--timeline-red) 82%, transparent);
}

.dmp-milestone-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 250px;
  gap: 0 28px;
  width: min(600px, 100%);
  height: calc((var(--timeline-rows, 3) * 250px) - 50px);
  min-height: calc((var(--timeline-rows, 3) * 250px) - 50px);
  margin: 0 auto;
}

.dmp-milestone-track::before { display: none; }

.dmp-milestone-route,
.dmp-milestone-route i { position: absolute; display: block; pointer-events: none; }
.dmp-milestone-route { z-index: 0; inset: 0; }
.route-line {
  left: 2.5%;
  right: 2.5%;
  height: 0;
  border-top: 3px dashed var(--timeline-red);
}
.route-line--main { left: 2.5%; }
.route-line--main:first-child { left: -27px; }
.route-line--main.is-last { right: calc(100% - var(--timeline-tail-left, 94.8%)); }
.route-line--return { left: 2.5%; right: 2.5%; }
.route-turn {
  width: 70px;
  height: 128px;
  border: 3px dashed var(--timeline-red);
}
.route-turn--right {
  right: -55px;
  border-left: 0;
  border-radius: 0 64px 64px 0;
}
.route-turn--left {
  left: -55px;
  border-right: 0;
  border-radius: 64px 0 0 64px;
}
.route-start {
  top: 94px;
  left: -52px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--timeline-red);
  box-shadow: -7px 0 0 -3px var(--timeline-red), 7px 0 0 -3px var(--timeline-red), 0 -7px 0 -3px var(--timeline-red), 0 7px 0 -3px var(--timeline-red);
}
.route-end {
  left: calc(var(--timeline-tail-left, 94.8%) - 8.5px);
  width: 17px;
  height: 17px;
  border-radius: 4px;
  background: var(--timeline-red);
  transform: rotate(45deg);
}

.dmp-milestone-track article {
  position: relative;
  z-index: 2;
  min-height: 0;
  color: var(--timeline-red);
  text-align: center;
}
.dmp-milestone-track article > div {
  position: absolute;
  top: 87px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 31px;
  margin: 0;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--timeline-red);
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  transform: translateX(-50%);
}
.dmp-milestone-track article section {
  position: absolute;
  left: 50%;
  width: 145px;
  color: var(--timeline-red) !important;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.1;
  transform: translateX(-50%);
}
.dmp-milestone-track article section::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 31px;
  background: var(--timeline-red);
}
.dmp-milestone-track article:nth-of-type(odd) section {
  top: 136px;
}
.dmp-milestone-track article:nth-of-type(odd) section::before {
  top: -18px;
  height: 18px;
}
.dmp-milestone-track article:nth-of-type(even) section {
  bottom: 170px;
}
.dmp-milestone-track article:nth-of-type(even) section::before {
  bottom: -7px;
  height: 7px;
}
.dmp-milestone-track article b { display: block; margin: 0 0 2px; color: var(--timeline-red); font-size: 10px; }
.dmp-milestone-track article p { margin: 0; color: var(--timeline-red) !important; }
.dmp-milestone-track article p a {
  color: #e36f2d;
  text-decoration-line: underline;
  text-decoration-color: #e36f2d;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.dmp-milestone-more {
  right: auto;
  bottom: auto;
  left: calc(var(--timeline-tail-left, 94.8%) + 13px);
  z-index: 3;
  color: var(--timeline-red);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .dmp-franchise-milestones { padding: 35px 28px 58px; }
  .dmp-milestone-heading-line { margin-bottom: 35px; }
  .dmp-milestone-track {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding-left: 42px;
  }
  .dmp-milestone-route { display: block; left: 14px; right: auto; width: 0; border-left: 3px dashed var(--timeline-red); }
  .dmp-milestone-route i { display: none; }
  .dmp-milestone-track article { min-height: 145px; text-align: left; }
  .dmp-milestone-track article > div {
    position: relative;
    top: auto;
    left: auto;
    width: min(190px, 100%);
    transform: none;
  }
  .dmp-milestone-track article > div::before {
    content: "";
    position: absolute;
    top: 15px;
    left: -28px;
    width: 28px;
    border-top: 3px dashed var(--timeline-red);
  }
  .dmp-milestone-track article section,
  .dmp-milestone-track article:nth-of-type(odd) section,
  .dmp-milestone-track article:nth-of-type(even) section {
    position: static;
    width: auto;
    margin-top: 10px;
    font-size: 13px;
    transform: none;
  }
  .dmp-milestone-track article section::before,
  .dmp-milestone-track article section::after { display: none; }
  .dmp-milestone-more { position: static; display: block; margin-top: 4px; }
}
