/* ===================================
   SECTION 5 — HOW IT WORKS
   Four steps (index-section-5-new.ejs): a plain numeral with a short accent underline above a mint
   disc with the step icon, a dashed line through the disc centres on wide layouts; stacked with a
   vertical dashed line on phones. The closing line names the right of withdrawal.
   =================================== */

.home-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
/* numeral (36) + gap (10) + half disc (36) = 82px: the line runs through the disc centres */
.home-flow::before {
  content: '';
  position: absolute;
  top: 82px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  z-index: 0;
  background: repeating-linear-gradient(90deg, var(--tp-line-accent) 0 8px, transparent 8px 16px);
}
.home-flow__step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  padding: 0 8px;
  text-align: center;
}
.home-flow__num {
  display: grid;
  justify-items: center;
  gap: 6px;
  height: 36px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1;
  color: var(--tp-accent-hover);
}
.home-flow__num::after {
  content: '';
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--tp-accent);
}
.home-flow__disc {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--tp-mint);
  color: var(--tp-accent);
  box-shadow: inset 0 0 0 1.5px rgba(14, 131, 119, 0.18), 0 14px 26px -18px rgba(14, 131, 119, 0.4);
  outline: 6px solid var(--tp-paper);
}
.home-section--cream .home-flow__disc {
  outline-color: var(--tp-cream);
}
.home-flow__disc svg {
  display: block;
  width: 32px;
  height: 32px;
}
.home-flow__text {
  display: grid;
  gap: 4px;
  justify-items: center;
}
.home-flow__text strong {
  display: block;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.home-flow__text > span {
  display: block;
  max-width: 220px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--tp-ink-2);
}
.home-flow__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding: 14px 18px;
  border: 1px solid var(--tp-line);
  border-radius: 999px;
  background: var(--tp-cream);
  font-size: 14.5px;
  color: var(--tp-ink-2);
}
.home-section--cream .home-flow__foot {
  background: var(--tp-paper);
}
.home-flow__foot svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--tp-accent);
}
.home-flow__foot b {
  color: var(--tp-ink);
  font-weight: 800;
}

@media (max-width: 820px) {
  .home-flow {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .home-flow::before {
    display: none;
  }
  .home-flow__step {
    grid-template-columns: 68px minmax(0, 1fr);
    grid-template-areas:
      'num num'
      'disc txt';
    justify-items: start;
    gap: 8px 16px;
    padding: 0 0 22px;
    text-align: left;
  }
  .home-flow__num {
    grid-area: num;
    justify-items: start;
    height: 32px;
    font-size: 26px;
  }
  .home-flow__disc {
    grid-area: disc;
    width: 68px;
    height: 68px;
  }
  .home-flow__text {
    grid-area: txt;
    justify-items: start;
    align-self: center;
  }
  .home-flow__text > span {
    max-width: none;
  }
  .home-flow__step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 33px;
    top: 114px;
    bottom: 4px;
    width: 2px;
    background: repeating-linear-gradient(180deg, var(--tp-line-accent) 0 8px, transparent 8px 16px);
  }
  .home-flow__foot {
    justify-content: flex-start;
    border-radius: var(--tp-r-md);
  }
}
