/* two columns, no divider (as rw-path): eyebrow, headline and lead hold on the left while the ladder scrolls past */
#rw-ladder .rw-ladder-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 96px); align-items: start; }
#rw-ladder .rw-ladder-head { position: sticky; top: 120px; container-type: inline-size; }
/* "whole way home." always holds one line: the headline keeps the house size until the column is too narrow for it */
#rw-ladder .rw-ladder-head .cp-h { font-size: min(clamp(44px, 6.4vw, 100px), 12.4cqi); }
@media (max-width: 900px) { #rw-ladder .rw-ladder-grid { grid-template-columns: minmax(0, 1fr); } #rw-ladder .rw-ladder-head { position: static; } }

/* ---------- The ladder -------------------------------------------------
   Rows ruled top and bottom. A rail runs down the left gutter: one segment
   per rung, from its node to the next node, so the geometry is pure CSS.
   --c is the node centre from the top of a row (lined up on the numeral). */
#rw-ladder .rl {
  --g: 64px;                                   /* rail gutter */
  --pad: clamp(24px, 2.2vw, 32px);              /* row padding */
  --n: clamp(40px, 3.9vw, 58px);                /* numeral size */
  --node: 24px;
  --c: calc(var(--pad) + 24px + var(--n) * .47);
  container-type: inline-size; position: relative;
}
#rw-ladder .rl-list { padding-left: var(--g); }
#rw-ladder .rl-rung {
  position: relative; display: grid; grid-template-columns: calc(var(--n) * 3.2) minmax(0, 1fr) 20px; column-gap: clamp(20px, 2.4vw, 36px);
  align-items: start; padding-block: var(--pad); border-top: 1px solid var(--rule);
}
#rw-ladder .rl-rung:last-child { border-bottom: 1px solid var(--rule); }
/* two columns: the first rung has no rule over it, starts level with the eyebrow, and its rail segment
   reaches the next node. Stacked (tablet, phone) it keeps its top rule under the lead. */
@media (min-width: 900.02px) {
  #rw-ladder .rl-rung:first-child { --p1: 8px; border-top: 0; padding-top: var(--p1); --c: calc(var(--p1) + 24px + var(--n) * .47); }
  #rw-ladder .rl-rung:first-child .rl-seg { height: calc(100% + 1px + var(--pad) - var(--p1)); }
}

/* threshold: mono label over a display numeral */
#rw-ladder .rl-at { display: grid; gap: 8px; }
#rw-ladder .rl-lab, #rw-ladder .rl-note { font-family: var(--f-mono); font-size: var(--t-label); line-height: 16px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg2); }
#rw-ladder .rl-num { font-family: var(--f-display); font-weight: 800; font-size: var(--n); line-height: .9; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }

/* name + line: tops level with the threshold label on the left */
#rw-ladder .rl-what { padding-top: 0; }
#rw-ladder .rl-what h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(21px, 1.8vw, 26px); line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
#rw-ladder .rl-what p { margin-top: 8px; max-width: 34ch; font-size: 16px; line-height: 1.45; color: var(--fg2); text-wrap: pretty; }
#rw-ladder .rl-ic { width: 20px; height: 20px; align-self: center; margin-top: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .78; }

/* rail: track + ink fill, node to node */
#rw-ladder .rl-seg { position: absolute; left: calc(var(--g) * -1 + var(--node) / 2 - 1px); top: var(--c); width: 2px; height: calc(100% + 1px); background: var(--rule); }
#rw-ladder .rl-fill { position: absolute; inset: 0; background: var(--ink); transform-origin: 50% 0; }
#rw-ladder .is-here .rl-fill { bottom: auto; height: calc(100% + 1px - var(--c)); }
#rw-ladder .rl-rung.is-here ~ .rl-rung .rl-fill { display: none; }

/* nodes: solid with a check when unlocked, outlined when ahead */
#rw-ladder .rl-node {
  position: absolute; z-index: 1; left: calc(var(--g) * -1); top: calc(var(--c) - var(--node) / 2); width: var(--node); height: var(--node);
  display: grid; place-items: center; border-radius: 50%; border: 1.8px solid var(--ink); background: var(--bg); color: var(--bg);
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
#rw-ladder .rl-node svg { width: 14px; height: 14px; transform: scale(.4); opacity: 0; transition: transform .45s var(--ease), opacity .3s var(--ease); }
#rw-ladder .rl-rung.is-on .rl-node { background: var(--ink); }
#rw-ladder .rl-rung.is-on .rl-node svg { transform: none; opacity: 1; }

/* the sample member's place: on the divider between 4,000 and 8,000 */
#rw-ladder .rl-you { position: absolute; z-index: 2; left: calc(var(--g) * -1 + var(--node) / 2 - 6px); top: calc(100% + .5px); display: flex; align-items: center; transform: translateY(-50%); pointer-events: none; }
#rw-ladder .rl-you-dot { flex: none; width: 12px; height: 12px; background: var(--ink); transform: rotate(45deg); }
#rw-ladder .rl-you-tag {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; margin-left: calc(var(--g) - var(--node) / 2 - 6px); padding: 0 10px;
  background: var(--ink); color: var(--paper); font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
#rw-ladder .rl-you-tag i, #rw-ladder .rl-note i { font-style: normal; opacity: .6; }
#rw-ladder .rl-you { background: linear-gradient(var(--ink), var(--ink)) 0 50% / 100% 1.5px no-repeat; }

#rw-ladder .rl-note { margin-top: 20px; padding-left: var(--g); }   /* starts where the dividers above it start */

/* motion: the marker waits for the fill (js adds .rl-anim, then .is-set) */
#rw-ladder .rl-you, #rw-ladder .rl-you-tag { transition: opacity .45s var(--ease), clip-path .6s var(--ease); }
#rw-ladder .rl-anim .rl-you { opacity: 0; }
#rw-ladder .rl-anim .rl-you-tag { clip-path: inset(0 100% 0 0); }
#rw-ladder .rl-anim.is-set .rl-you { opacity: 1; }
#rw-ladder .rl-anim.is-set .rl-you-tag { clip-path: inset(0 0 0 0); }

/* narrow column (1024 two-up, tablet, phone): numeral over name */
@container (max-width: 600px) {
  #rw-ladder .rl-rung { grid-template-columns: minmax(0, 1fr) 20px; row-gap: 14px; }
  #rw-ladder .rl-at { grid-column: 1; }
  #rw-ladder .rl-what { grid-column: 1; padding-top: 0; }
  #rw-ladder .rl-ic { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; align-self: center; }
}
@media (max-width: 560px) {
  #rw-ladder .rl { --g: 44px; --node: 22px; --n: 40px; --pad: 24px; }
  #rw-ladder .rl-lab, #rw-ladder .rl-note, #rw-ladder .rl-you-tag { font-size: 12.5px; }
  #rw-ladder .rl-what p { font-size: 16px; }
}
