/* Scroll-shadow hint for the sideways-scroll tree region (.tree-scroll). CSS only, no JS, no extra focus stops.
   Technique: two "covers" in --tree-bg scroll WITH the content (background-attachment: local) and hide
   two shadows that stay fixed at the edges (scroll). At the start the left cover sits over the left shadow,
   at the end the right cover sits over the right shadow; mid-scroll both shadows show.
   When nothing overflows, both covers sit on both shadows, so no hint appears.
   Load after trees.css. Works with the existing role=region tabindex=0 wrapper; adds no focusable element. */
@layer components {
  .tree-figure .tree-scroll {
    --tree-shadow: color-mix(in srgb, var(--tree-ink) 28%, transparent);
    background:
      linear-gradient(to right, var(--tree-bg) 40%, transparent) left  / 2.5rem 100% no-repeat local,
      linear-gradient(to left,  var(--tree-bg) 40%, transparent) right / 2.5rem 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%,    var(--tree-shadow), transparent) left  / .9rem 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, var(--tree-shadow), transparent) right / .9rem 100% no-repeat scroll,
      var(--tree-bg);
  }
}
/* Forced colours: gradients would be painted in author colours; drop the hint and keep the system canvas. */
@media (forced-colors: active) { .tree-figure .tree-scroll { background: Canvas; } }
/* Print: the region doesn't scroll in print, so no hint. */
@media print { .tree-figure .tree-scroll { background: none; } }
