













.halves-stage{display:block}
.halves-pin{display:grid;grid-template-columns:minmax(0,1fr);gap:28px}
.tree-box{position:relative;width:min(100%,420px);aspect-ratio:1}

.tree-box>svg,.tree-box>canvas{position:absolute;inset:0;width:100%!important;height:100%!important}



.tree-box{overflow:clip}
.tree-seal{transform-origin:88% 86%}
.half-factory{--route:88px;position:relative;display:flex;align-items:center;justify-content:center;padding:28px 8px 44px var(--route);overflow:hidden}
html[data-motion] .half-factory{justify-content:flex-end}
.halves .blocks{--gap:12px;position:relative;z-index:1;isolation:isolate;display:grid;gap:var(--gap);width:max-content;max-width:100%;height:auto}
.halves .block{position:relative;overflow-wrap:anywhere;padding:10px 16px;border:1px solid var(--paper-control);border-left:3px solid var(--seal);border-radius:8px;background:var(--paper);color:var(--paper-ink);font-weight:500;line-height:1.3}

.halves .block::before{content:"";position:absolute;inset:-6px;z-index:-1;border-radius:13px;background:var(--paper);opacity:.5}



.tree-dead{color:var(--faint)}
.tree-kept{color:var(--accent)}
.halves-stage[data-tree]:not([data-tree="growing"]) .tree-still{visibility:hidden}
.halves-stage:is(:not([data-tree]),[data-tree="growing"]) .block::after{
  content:"";position:absolute;z-index:-2;left:-31px;top:calc(50% - 6px);width:29px;height:calc(100% + var(--gap) + 9px);pointer-events:none;
  background:radial-gradient(circle at 22px 6px,var(--bg) 3.6px,var(--ink) 3.7px 5.3px,transparent 5.5px) no-repeat,
    linear-gradient(var(--ink),var(--ink)) 0 5.1px/18px 1.75px no-repeat,
    linear-gradient(var(--ink),var(--ink)) 0 5.1px/1.75px calc(100% - 5px) no-repeat
}
.halves-stage:is(:not([data-tree]),[data-tree="growing"]) .block:last-child::after{height:12px;background-size:auto,18px 1.75px,0 0}
.halves-stage:is(:not([data-tree]),[data-tree="growing"]) .blocks::after{
  content:"";position:absolute;z-index:-2;right:calc(100% + 30px);top:calc(50% - 1.1px);width:100vw;height:2.25px;background:var(--accent);pointer-events:none
}
.traces{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.trace{fill:none;stroke:var(--ink);stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.trace-kept{stroke:var(--accent);stroke-width:2.25}
.trace-floor{stroke:var(--accent);stroke-dasharray:5 6}
.trace-pad{fill:var(--bg);stroke:var(--ink);stroke-width:1.75}
.trace-via{fill:var(--ink)}
.halves-stage .steps{gap:28px}
.halves-stage .step{padding:0}
@media (min-width:900px){
  .halves-pin{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch}
  .halves-pin .steps{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr))}
}


html[data-motion]:not([data-motion="reduced"]) .halves-track{height:300svh}
html[data-motion]:not([data-motion="reduced"]) .halves-pin{
  position:sticky;top:var(--head);height:calc(100svh - var(--head));
  grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto;
  grid-template-areas:"research" "factory" "steps";gap:12px;padding-block:12px 16px;align-items:stretch
}
html[data-motion]:not([data-motion="reduced"]) .half-research{grid-area:research;min-height:0;container-type:size}
html[data-motion]:not([data-motion="reduced"]) .tree-box{width:min(100cqw,100cqh)}
html[data-motion]:not([data-motion="reduced"]) .half-factory{grid-area:factory;padding-block:24px 40px}
html[data-motion]:not([data-motion="reduced"]) .halves-pin .steps{grid-area:steps;grid-template-columns:minmax(0,1fr);gap:0}



html[data-motion]:not([data-motion="reduced"]) .halves-stage .step{grid-area:1/1;transition:opacity .25s}

html[data-motion]:not([data-motion="reduced"]) .halves-stage[data-instant] .step{transition:none}
html[data-motion]:not([data-motion="reduced"]) .halves-stage:not([data-step="research"]) .step[data-step="research"],
html[data-motion]:not([data-motion="reduced"]) .halves-stage:not([data-step="factory"]) .step[data-step="factory"],
html[data-motion]:not([data-motion="reduced"]) .halves-stage:not([data-step="loop"]) .step[data-step="loop"]{opacity:0}

@media (max-height:700px) and (max-aspect-ratio:1/1){
  html[data-motion]:not([data-motion="reduced"]) .halves-pin{gap:8px;padding-block:8px 10px}
  html[data-motion]:not([data-motion="reduced"]) .halves-stage .step h3{font-size:1.125rem}
  html[data-motion]:not([data-motion="reduced"]) .halves-stage .step p{font-size:.9375rem;line-height:1.45}
  html[data-motion]:not([data-motion="reduced"]) .halves-stage .step>*+*{margin-top:6px}
  html[data-motion]:not([data-motion="reduced"]) .halves .blocks{--gap:7px}
  html[data-motion]:not([data-motion="reduced"]) .halves .block{padding:5px 12px;font-size:.875rem}
  html[data-motion]:not([data-motion="reduced"]) .half-factory{padding-block:16px 34px}
}

@media (min-width:700px) and (min-aspect-ratio:1/1){
  html[data-motion]:not([data-motion="reduced"]) .halves-pin{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,46rem) auto;
    grid-template-areas:"research factory" "steps steps";gap:16px 32px;padding-block:16px 20px;align-content:center
  }
  html[data-motion]:not([data-motion="reduced"]) .half-factory{min-height:0}
}

@media (max-height:560px) and (min-aspect-ratio:3/2){
  html[data-motion]:not([data-motion="reduced"]) .halves-pin{
    grid-template-columns:minmax(0,.8fr) minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);
    grid-template-areas:"research factory steps";gap:16px;padding-block:10px 12px
  }
  html[data-motion]:not([data-motion="reduced"]) .halves-pin .steps{align-self:center}
  html[data-motion]:not([data-motion="reduced"]) .halves-stage .step h3{font-size:1.125rem}
  html[data-motion]:not([data-motion="reduced"]) .halves-stage .step p{font-size:.9375rem;line-height:1.45}
  html[data-motion]:not([data-motion="reduced"]) .halves .blocks{--gap:7px}
  html[data-motion]:not([data-motion="reduced"]) .halves .block{padding:5px 12px;font-size:.875rem}
  html[data-motion]:not([data-motion="reduced"]) .half-factory{min-height:0;padding:14px 4px 30px var(--route)}
}
