.hiw {
  font-family: var(--bk-p-family, var(--bk-font-base, 'Montserrat', ui-sans-serif, system-ui, sans-serif));
  background: linear-gradient(180deg, var(--bk-color-surface, #f6f5f3) 0%, var(--bk-color-surface, #efeeea) 100%);
  color: var(--bk-p-color, var(--bk-color-ink, #29234a));
  padding: 120px 0 128px;
  border-top: 1px solid var(--bk-color-surface, #e4e1db);
  border-bottom: 1px solid var(--bk-color-surface, #e4e1db);
  overflow: hidden;
  color-scheme: light;
}

.hiw-wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ---------- header ---------- */
.hiw-head { max-width: 900px; margin-bottom: 56px; }
.hiw-head h2 {
  margin: 0;
  font-weight: var(--bk-h2-weight, 300);
  letter-spacing: var(--bk-h2-letter-spacing, -0.025em);
  line-height: var(--bk-h2-line-height, 1.02);
  font-size: var(--bk-h2-size, clamp(36px, 4.6vw, 64px));
}
.hiw-head h2 em { font-style: var(--bk-h2-style, normal); font-weight: var(--bk-h2-weight, 500); color: var(--bk-color-secondary, #a4ace5); }
.hiw-lede {
  margin: 20px 0 0;
  max-width: 62ch;
  font-size: var(--bk-p-size, 17px);
  line-height: var(--bk-p-line-height, 1.55);
  font-weight: var(--bk-p-weight, 400);
  color: var(--bk-p-color, var(--bk-color-ink, #534b7e));
}

/* ---------- timeline ---------- */
.hiw-timeline {
  position: relative;
  /* the list below gets 8px top / 16px bottom padding (dot halo + scrollbar
     room); these margins cancel it so the section height is unchanged
     (-8px collapses with the header's 56px margin -> 48px) */
  margin-top: -8px;
  margin-bottom: -16px;
  --n: 7;
  --gap: 20px;
}

/* the connecting rail is painted on .hiw-steps itself (below) with
   background-attachment: local, so it spans first dot-centre to last
   dot-centre across the WHOLE scroll width and grows when a step is
   cloned. --n is the live step count (set further down). */
.hiw-rail { display: none; }

.hiw-steps {
  position: relative;
  z-index: 1;
  display: grid;
  /* one column per step, each 1/7 of the visible width: 7 steps fill the
     row exactly; an 8th+ (cloned) step scrolls horizontally */
  grid-auto-flow: column;
  grid-auto-columns: minmax(calc((100% - 6 * var(--gap)) / 7), 1fr);
  gap: var(--gap);
  align-items: start;
  margin: 0;
  padding: 8px 0 16px;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--bk-color-secondary, #a4ace5) transparent;
  /* rail: one column narrower than the scroll content, centred =
     dot-centre to dot-centre (dot centre = 8px padding + 9px) */
  background: linear-gradient(90deg, var(--bk-color-secondary, #a4ace5) 0%, var(--bk-color-accent, #5d92c2) 50%, var(--bk-color-accent, #1678a0) 100%)
              no-repeat local center 17px /
              calc(100% - (100% - (var(--n) - 1) * var(--gap)) / var(--n)) 2px;
}
.hiw-steps::-webkit-scrollbar { height: 6px; }
.hiw-steps::-webkit-scrollbar-thumb { background: var(--bk-color-secondary, #a4ace5); border-radius: 3px; }
.hiw-steps::-webkit-scrollbar-track { background: transparent; }

.hiw-step { position: relative; padding: 0 6px; text-align: center; }

/* hairline divider to the right of each step (not the last) */
.hiw-step::after {
  content: "";
  position: absolute;
  top: 46px;
  right: -10px;
  bottom: 6px;
  width: 1px;
  background: var(--bk-color-surface, #e4e1db);
}
.hiw-step:last-child::after { display: none; }

.hiw-dot {
  width: 18px;
  height: 18px;
  margin: 0 auto 30px;
  border-radius: 50%;
  background: var(--bk-color-accent, var(--c));
  box-shadow: 0 0 0 6px var(--bk-color-surface, #f1f0ec),
              0 0 0 7px color-mix(in srgb, var(--bk-color-accent, var(--c)) 22%, transparent);
  position: relative;
  z-index: 2;
}

.hiw-num {
  margin-bottom: 16px;
  font-weight: var(--bk-p-weight, 200);
  font-size: var(--bk-p-size, 52px);
  line-height: var(--bk-p-line-height, 0.92);
  letter-spacing: var(--bk-p-letter-spacing, -0.035em);
  font-variant-numeric: tabular-nums;
}

.hiw-label {
  margin-bottom: 12px;
  font-size: var(--bk-overline-size, 10.5px);
  font-weight: var(--bk-overline-weight, 600);
  letter-spacing: var(--bk-overline-letter-spacing, 0.2em);
  text-transform: var(--bk-overline-transform, uppercase);
  color: var(--bk-color-accent, var(--c));
}

.hiw-step h3 {
  margin: 0 0 13px;
  font-weight: var(--bk-h3-weight, 600);
  font-size: var(--bk-h3-size, 16px);
  letter-spacing: var(--bk-h3-letter-spacing, -0.012em);
  line-height: var(--bk-h3-line-height, 1.22);
  text-wrap: balance;
}

.hiw-step p {
  margin: 0;
  font-size: var(--bk-p-size, 13px);
  line-height: var(--bk-p-line-height, 1.62);
  font-weight: var(--bk-p-weight, 400);
  color: var(--bk-color-secondary, #6b6588);
  text-wrap: pretty;
}

/* ---------- responsive ----------
   The continuous rail only reads on a single row, so once the
   steps wrap we drop the rail and the right-hand dividers and
   let the steps flow into a tidy auto-fit grid. */
@media (max-width: 1000px) {
  .hiw { padding: 90px 0 96px; }
  .hiw-rail { display: none; }
  .hiw-step::after { display: none; }
  .hiw-timeline { margin: 8px 0 0; }
  .hiw-steps {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px 24px;
    padding: 0;
    overflow: visible;
    background: none;
  }
}

@media (max-width: 520px) {
  .hiw-steps { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- step count (drives rail length + colour ramp) ---------- */
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(1):last-of-type) { --n: 1; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(2):last-of-type) { --n: 2; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(3):last-of-type) { --n: 3; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(4):last-of-type) { --n: 4; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(5):last-of-type) { --n: 5; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(6):last-of-type) { --n: 6; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(7):last-of-type) { --n: 7; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(8):last-of-type) { --n: 8; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(9):last-of-type) { --n: 9; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(10):last-of-type) { --n: 10; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(11):last-of-type) { --n: 11; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(12):last-of-type) { --n: 12; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(13):last-of-type) { --n: 13; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(14):last-of-type) { --n: 14; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(15):last-of-type) { --n: 15; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(16):last-of-type) { --n: 16; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(17):last-of-type) { --n: 17; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(18):last-of-type) { --n: 18; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(19):last-of-type) { --n: 19; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(20):last-of-type) { --n: 20; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(21):last-of-type) { --n: 21; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(22):last-of-type) { --n: 22; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(23):last-of-type) { --n: 23; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(24):last-of-type) { --n: 24; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(25):last-of-type) { --n: 25; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(26):last-of-type) { --n: 26; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(27):last-of-type) { --n: 27; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(28):last-of-type) { --n: 28; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(29):last-of-type) { --n: 29; }
.hiw-timeline:has(> .hiw-steps > .hiw-step:nth-of-type(30):last-of-type) { --n: 30; }

/* ---------- per-step accent colours ----------
   An even ramp #a4ace5 -> #1678a0 across however many steps exist,
   so a cloned step gets its own dot/label colour instead of none. */
.hiw-step:nth-of-type(1) { --i: 0; }
.hiw-step:nth-of-type(2) { --i: 1; }
.hiw-step:nth-of-type(3) { --i: 2; }
.hiw-step:nth-of-type(4) { --i: 3; }
.hiw-step:nth-of-type(5) { --i: 4; }
.hiw-step:nth-of-type(6) { --i: 5; }
.hiw-step:nth-of-type(7) { --i: 6; }
.hiw-step:nth-of-type(8) { --i: 7; }
.hiw-step:nth-of-type(9) { --i: 8; }
.hiw-step:nth-of-type(10) { --i: 9; }
.hiw-step:nth-of-type(11) { --i: 10; }
.hiw-step:nth-of-type(12) { --i: 11; }
.hiw-step:nth-of-type(13) { --i: 12; }
.hiw-step:nth-of-type(14) { --i: 13; }
.hiw-step:nth-of-type(15) { --i: 14; }
.hiw-step:nth-of-type(16) { --i: 15; }
.hiw-step:nth-of-type(17) { --i: 16; }
.hiw-step:nth-of-type(18) { --i: 17; }
.hiw-step:nth-of-type(19) { --i: 18; }
.hiw-step:nth-of-type(20) { --i: 19; }
.hiw-step:nth-of-type(21) { --i: 20; }
.hiw-step:nth-of-type(22) { --i: 21; }
.hiw-step:nth-of-type(23) { --i: 22; }
.hiw-step:nth-of-type(24) { --i: 23; }
.hiw-step:nth-of-type(25) { --i: 24; }
.hiw-step:nth-of-type(26) { --i: 25; }
.hiw-step:nth-of-type(27) { --i: 26; }
.hiw-step:nth-of-type(28) { --i: 27; }
.hiw-step:nth-of-type(29) { --i: 28; }
.hiw-step:nth-of-type(n+30) { --i: 29; }
.hiw-step {
  --c: color-mix(in srgb, var(--bk-color-accent, #1678a0) calc(var(--i) / max(var(--n) - 1, 1) * 100%), var(--bk-color-secondary, #a4ace5));
}
