/* Both watercolor stages share their root position; the prologue is separate. */
.years-sapling {
  position: absolute;
  z-index: 2;
  right: calc(26 * var(--u));
  top: calc(110 * var(--u));
  width: calc(560 * var(--u));
  height: calc(640 * var(--u));
  pointer-events: none;
}
.years-tree-static,
.years-seed-image,
.years-custom-tree,
.years-grown-drawing {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.years-seed-layer,
.years-grown-layer {
  display: none;
  position: absolute;
  inset: 0;
  transform-origin: 50% 86.6%;
}
.years-grown-drawing {
  display: block;
}
.years-root-network {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 50% 86.6%;
}
@media (prefers-reduced-motion: no-preference) {
  .years-growth-ready > .years-tree-static {
    visibility: hidden;
  }
  .years-growth-ready .years-seed-layer,
  .years-growth-ready .years-grown-layer {
    display: block;
  }
  .years-growth-ready .years-seed-layer {
    transform: scale(var(--years-seed-scale, 0.16));
    opacity: var(--years-seed-opacity, 1);
  }
  .years-growth-ready .years-grown-layer {
    transform: scale(
      var(--years-tree-scale-x, 0.58),
      var(--years-tree-scale-y, 0.45)
    );
    opacity: var(--years-tree-opacity, 0);
  }
  .years-growth-ready
    :is(
      .years-grown-root,
      .years-grown-trunk,
      .years-grown-branch,
      .years-crown
    ) {
    stroke-dasharray: 1;
  }
  .years-growth-ready .years-grown-root {
    stroke-dashoffset: calc(1 - var(--years-root, 0));
  }
  .years-growth-ready .years-grown-trunk {
    stroke-dashoffset: calc(1 - var(--years-trunk, 0));
  }
  .years-growth-ready .years-grown-branch-one {
    stroke-dashoffset: calc(1 - var(--years-branch-one, 0));
  }
  .years-growth-ready .years-grown-branch-two {
    stroke-dashoffset: calc(1 - var(--years-branch-two, 0));
  }
  .years-growth-ready .years-grown-branch-three {
    stroke-dashoffset: calc(1 - var(--years-branch-three, 0));
  }
  .years-growth-ready .years-crown-low-left {
    stroke-dashoffset: calc(1 - var(--years-crown-one, 0));
  }
  .years-growth-ready .years-crown-low-right {
    stroke-dashoffset: calc(1 - var(--years-crown-two, 0));
  }
  .years-growth-ready .years-crown-mid-left {
    stroke-dashoffset: calc(1 - var(--years-crown-three, 0));
  }
  .years-growth-ready .years-crown-mid-right {
    stroke-dashoffset: calc(1 - var(--years-crown-four, 0));
  }
  .years-growth-ready .years-crown-high-left {
    stroke-dashoffset: calc(1 - var(--years-crown-five, 0));
  }
  .years-growth-ready .years-crown-high-right {
    stroke-dashoffset: calc(1 - var(--years-crown-six, 0));
  }
  .years-growth-ready .years-crown-top {
    stroke-dashoffset: calc(1 - var(--years-crown-seven, 0));
  }
  .years-growth-ready .years-grown-complete {
    opacity: var(--years-complete, 0);
  }
  .years-growth-ready .years-root-network {
    opacity: var(--years-root-spread-opacity, 0);
    transform: scale(
      var(--years-tree-scale-x, 0.58),
      var(--years-tree-scale-y, 0.45)
    );
  }
  .years-growth-ready .years-root-network path {
    stroke-dasharray: 1;
  }
  .years-growth-ready .years-root-main path {
    stroke-dashoffset: calc(1 - var(--years-root-main, 0));
  }
  .years-growth-ready .years-root-branches path {
    stroke-dashoffset: calc(1 - var(--years-root-branches, 0));
  }
  .years-growth-ready .years-root-fine path {
    stroke-dashoffset: calc(1 - var(--years-root-fine, 0));
  }
  .years-growth-ready[data-years-art="custom"] .years-grown-layer {
    clip-path: inset(calc((1 - var(--years-trunk, 0)) * 85%) 0 0);
  }
}
@media (max-width: 767px) {
  .years {
    min-height: 650px;
    display: block;
    padding-bottom: 34px;
  }
  .years h2 {
    margin: 36px 0 30px;
  }
  .years-sapling {
    position: relative;
    top: auto;
    right: auto;
    width: 220px;
    height: 330px;
    max-width: 100%;
    margin: 26px auto 80px;
  }
}
@media print {
  .years-growth-ready .years-root-network {
    opacity: 1;
    transform: none;
  }
  .years-growth-ready .years-root-network path {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }
  .years-growth-ready > .years-tree-static {
    visibility: visible;
  }
  .years-growth-ready .years-seed-layer,
  .years-growth-ready .years-grown-layer {
    display: none;
  }
}
