/* The marker column owns the connector; cards never sit on top of it. */
.hiw-wrap {
  --hiw-progress: var(--accent);
  --hiw-on-progress: var(--footer-ink-strong);
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hiw-wrap {
    --hiw-progress: var(--accent-ink);
    --hiw-on-progress: var(--bg);
  }
}

:root[data-theme="dark"] .hiw-wrap {
  --hiw-progress: var(--accent-ink);
  --hiw-on-progress: var(--bg);
}

.hiw-hero { text-align: center; padding: 3rem 0 2rem; }
.hiw-hero h1 { font-size: 2rem; font-weight: 800; margin: 0 0 .75rem; }
.hiw-hero p { font-size: 1rem; color: var(--ink-2); max-width: 500px; margin: 0 auto; }
.hiw-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  list-style: none;
  margin: 3rem 0;
  padding: 0;
}
.hiw-step {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
/* Each segment runs from this circle's centre to the next circle's centre.
   The 56px overhang is the 32px row gap plus the next circle's 24px radius. */
.hiw-step:not(:last-child)::before,
.hiw-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  bottom: -56px;
  left: 23px;
  width: 2px;
  background: var(--line-strong);
  pointer-events: none;
}
.hiw-step:not(:last-child)::after {
  background: var(--hiw-progress);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s ease;
}
.hiw-step.is-connected::after { transform: scaleY(1); }
.hiw-step-num {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 1.25rem;
  font-weight: 800;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
.hiw-step.is-reached .hiw-step-num {
  border-color: var(--hiw-progress);
  background: var(--hiw-progress);
  color: var(--hiw-on-progress);
}
.hiw-step-body {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow-wrap: anywhere;
}
.hiw-step-body h3 { font-size: 1.125rem; font-weight: 700; margin: 0 0 .5rem; color: var(--ink); }
.hiw-step-body p { font-size: 1rem; color: var(--ink-2); margin: 0; line-height: 1.6; }
.hiw-cta { text-align: center; margin-top: 3rem; }

@media (max-width: 480px) {
  .hiw-step { column-gap: 1rem; }
  .hiw-step-body { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hiw-step .hiw-step-num {
    border-color: var(--hiw-progress);
    background: var(--hiw-progress);
    color: var(--hiw-on-progress);
    transition: none;
  }
  .hiw-step:not(:last-child)::after {
    transform: scaleY(1);
    transition: none;
  }
  .hiw-wrap .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
