/* October 2026 research figures. The supplied light artwork remains the fallback.
   Scroll motion is enabled only after successful initialization; complete artwork is the fallback. */
.cr-figure {
  margin: 40px 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  container-type: inline-size;
}
html[data-theme="dark"] .cr-figure {
  --cr-card: #1c1c1e;
  --cr-panel: #2c2c2e;
  --cr-curbon-panel: #0b0b0c;
  --cr-ink: #f5f5f7;
  --cr-muted: #b6b6ba;
  --cr-subtle: #a1a1a6;
  --cr-connector: #8e8e93;
  --cr-rule: #48484c;
  --cr-series-strong: #545459;
  --cr-series-mid: #6e6e70;
  --cr-problem-ink: #ff6961;
  --cr-signal-panel: #12331a;
  --cr-signal-ink: #d9f2df;
}
/* Translucent glass tints keep the design area light in both themes. */
#fig-01-design-decisions {
  --cr-design-glass-top: rgba(64, 64, 70, .24);
  --cr-design-glass-bottom: rgba(64, 64, 70, .10);
}
html[data-theme="dark"] #fig-01-design-decisions {
  --cr-design-glass-top: rgba(64, 64, 70, .72);
  --cr-design-glass-bottom: rgba(40, 40, 46, .48);
}
.cr-figure > figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--cr-muted, #6e6e70); }
/* Let each diagram sit on the page; internal cards still convey structure. */
.cr-figure .cr-card { fill: transparent; }
.cr-figure .cr-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--cr-connector, #a1a1a6) transparent;
}
.cr-figure .cr-scroll:focus-visible { outline: 2px solid var(--cr-ink, #3c3c3e); outline-offset: 4px; }
.cr-figure .cr-svg { display: block; width: 100%; min-width: 900px; height: auto; }
.cr-figure > .cr-scroll-hint { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--cr-muted, #6e6e70); }
@container (min-width: 900px) { .cr-figure > .cr-scroll-hint { display: none; } }
html[data-theme="dark"] .cr-figure .cr-partner-logo { filter: brightness(0) invert(1); opacity: .85; }

/* The controller supplies a 0–1 step for each element in its narrative order. */
:is(.cr-figure, .research-year-list) :is(.cr-grow-x, .cr-grow-y, .cr-rise) { transform-box: fill-box; }
:is(.cr-figure, .research-year-list) .cr-grow-x { transform-origin: left center; }
:is(.cr-figure, .research-year-list) .cr-grow-y { transform-origin: center bottom; }
@media (prefers-reduced-motion: no-preference) {
  :is(.cr-figure, .research-year-list)[data-cr-motion="scroll"] .cr-fade { opacity: var(--cr-step, 1); }
  :is(.cr-figure, .research-year-list)[data-cr-motion="scroll"] .cr-rise {
    opacity: var(--cr-step, 1);
    transform: translateY(calc((1 - var(--cr-step, 1)) * 14px));
  }
  :is(.cr-figure, .research-year-list)[data-cr-motion="scroll"] .cr-grow-x { transform: scaleX(var(--cr-step, 1)); }
  :is(.cr-figure, .research-year-list)[data-cr-motion="scroll"] .cr-grow-y { transform: scaleY(var(--cr-step, 1)); }
  :is(.cr-figure, .research-year-list)[data-cr-motion="scroll"] .cr-draw {
    stroke-dasharray: var(--len, 2000);
    stroke-dashoffset: calc(var(--len, 2000) * (1 - var(--cr-step, 1)));
  }
  :is(.cr-figure, .research-year-list)[data-cr-motion="scroll"] .cr-wipe { clip-path: inset(0 calc((1 - var(--cr-step, 1)) * 100%) 0 0); }
}
@media (prefers-reduced-motion: reduce), print {
  :is(.cr-figure, .research-year-list) :is(.cr-fade, .cr-rise, .cr-grow-x, .cr-grow-y, .cr-draw, .cr-wipe) {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
}
