/* How it works: "Improvement is not a single leap" as a stack of four layers.
   Each level is a label on the left joined to a large isometric plate on the right, shown as its
   left half only (the rest is cut off at the frame's edge); Level 1 is the foundation at the bottom. At rest only the names show. Pointing at a level (or focusing it, or
   tapping it on a phone) slides its plate out, still in its place in the stack, and opens its description: the stack is centred in a
   fixed-height frame, so the levels above move up and the levels below move down to make the room. */
.hw-levels .section-intro{display:block;max-width:none;margin:0 0 8px}
.hw-levels .section-intro h2{margin-bottom:0;text-wrap:balance}
.hw-levels .intro-side{max-width:62ch;margin:22px 0 0}
.lv{--pw:600px;--vis:calc(var(--pw)*.55);--row:100px;display:flex;flex-direction:column;justify-content:center;min-height:640px}
/* the frame keeps room above the stack for the plates' overhang and for levels moving up; the plates
   sit right of the intro, so the frame can rise to tuck the labels in under the intro */
.lv{margin-top:-60px}
.lv-list{display:flex;flex-direction:column-reverse;margin:0;padding:0;list-style:none}
.lv-row{position:relative;display:grid;grid-template-columns:minmax(0,440px) minmax(60px,1fr) var(--vis);align-items:center;min-height:var(--row);
  outline:none;cursor:default;transition:padding .45s cubic-bezier(.2,.7,.2,1)}
.lv-row:nth-child(1){z-index:1;--t:#1b4585;--l:#143468;--r:#0f2a55}
.lv-row:nth-child(2){z-index:2;--t:#2659a6;--l:#1b4585;--r:#163a72}
.lv-row:nth-child(3){z-index:3;--t:#3d73c4;--l:#2659a6;--r:#1f4d91}
.lv-row:nth-child(4){z-index:4;--t:#6b98dc;--l:#3d73c4;--r:#3264b0}
/* the label */
.lv-label{display:flex;align-items:flex-start;gap:18px;padding:16px 0}
.lv-num{flex:0 0 40px;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#1b4585;color:#fff;
  font:700 16px/1 'Manrope',sans-serif;transition:background-color .3s,color .3s}
.lv-vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.lv-words{min-width:0;padding-top:6px}
.page-methodology main .lv-words h3{margin:0;font:700 var(--t-h3l,26px)/1.15 'Manrope',sans-serif;letter-spacing:-.035em;color:var(--text);transition:color .3s}
.lv-more{display:grid;grid-template-rows:0fr;transition:grid-template-rows .45s cubic-bezier(.2,.7,.2,1)}
.lv-more>p{min-height:0;overflow:hidden;opacity:0;transition:opacity .3s}
.page-methodology main .lv-more p{margin:0;padding-top:10px;font-size:var(--t-card,17px);line-height:1.6;color:var(--muted)}
/* the line from label to plate */
.lv-link{position:relative;height:2px;margin:0 10px 0 22px;background:#b9c9e2;transition:background-color .3s,margin .5s cubic-bezier(.2,.7,.2,1)}
.lv-link::after{content:"";position:absolute;right:-5px;top:-4px;width:10px;height:10px;border-radius:50%;background:inherit}
/* the plate, tipped well back (its top face three times as wide as it is deep) and thin; the
   centre of its top face, a sixth of its width down, sits on the label's line */
/* only the right edge is cut, so a plate can still slide out to the left and overhang above and below */
.lv-plate{position:relative;align-self:stretch;width:var(--vis);clip-path:inset(-400px 0 -400px -200px)}
.lv-plate svg{position:absolute;left:0;top:calc(50% - var(--pw)/6);width:var(--pw);height:auto;overflow:visible;pointer-events:none;
  transition:transform .5s cubic-bezier(.2,.7,.2,1),opacity .35s}
.lv-t{fill:var(--t)}.lv-l{fill:var(--l)}.lv-r{fill:var(--r)}
/* a level in focus */
.lv-row.is-active .lv-more,.lv:not(.lv-js) .lv-row:is(:hover,:focus-within) .lv-more{grid-template-rows:1fr}
.lv-row.is-active .lv-more>p,.lv:not(.lv-js) .lv-row:is(:hover,:focus-within) .lv-more>p{opacity:1;transition-delay:.12s}
.lv-row.is-active{padding:18px 0}
/* the open level keeps its place in the stack and slides out toward its label; its line shortens to
   meet it, and the plates around it fade so it shows through them */
.lv-row.is-active .lv-plate svg{transform:translateX(-34px)}
.lv-row.is-active .lv-link{margin-right:44px}
.lv-row.is-active .lv-num{background:#faa61a;color:#07172c}
.lv-row.is-active .lv-link{background:#1b4585}
.lv-list.has-active .lv-row:not(.is-active) .lv-plate svg{opacity:.28}
.lv-list.has-active .lv-row:not(.is-active) .lv-words h3{color:var(--muted)}
.lv-row:focus-visible .lv-num{outline:3px solid #faa61a;outline-offset:3px}
html[data-theme=dark] .lv-num{background:#2c5ea8}
html[data-theme=dark] .lv-link{background:#2d4466}
html[data-theme=dark] .lv-row.is-active .lv-link{background:#9fc0f5}
html[data-theme=dark] .lv-row:nth-child(4){--t:#86acea;--l:#4f82cf;--r:#4475c0}
@media(max-width:980px){
  .lv{--pw:380px;--row:84px;min-height:500px;margin-top:-10px}
  .lv-row{grid-template-columns:minmax(0,1fr) 40px var(--vis)}
  .lv-link{margin:0 6px 0 12px}
}
@media(max-width:600px){
  /* on a phone the intro spans the full width, so the stack grows downward only and never reaches it */
  .lv{--pw:230px;--row:70px;min-height:0;margin-top:0;padding:24px 0 30px;justify-content:flex-start}
  .lv-row{grid-template-columns:minmax(0,1fr) 18px var(--vis)}
  .lv-label{gap:12px}
  .lv-num{flex-basis:34px;width:34px;height:34px;font-size:15px}
  .page-methodology main .lv-words h3{font-size:20px}
  .lv-words{padding-top:5px}
  .lv-link{margin:0 4px 0 6px}
  .lv-row.is-active .lv-plate svg{transform:translateX(-12px)}
  .lv-row.is-active .lv-link{margin-right:16px}
}
@media(prefers-reduced-motion:reduce){
  .lv-row,.lv-more,.lv-more>p,.lv-plate svg{transition:none}
}
