/* Whole-composition mobile artwork fitting, approved 2026-10-27.
   Frame owns page geometry; the artboard owns UI coordinates and typography.
   Existing .fit / SVG / Global Ops fit owners do not opt in to this layer.
   display:contents preserves the approved desktop layout and provides the
   existing readable layout when container arithmetic is unavailable. */
[data-wy-ui-artwork] > .wy-ui-artboard { display:contents; }

@media (max-width:767px) {
  @supports (transform:scale(calc(1px / 1px))) or (transform:scale(tan(atan2(1px,1px)))) {
    /* Opt-in frame contract also supplies its block size to cqh. This wins
       over the older page-specific inline-size-only declarations. */
    [data-wy-ui-artwork] { container-type:size!important; }
    [data-wy-ui-artwork] > .wy-ui-artboard {
      /* Both reference families use a 832 x 520 composition. The square
         Global Site scene remains 520 x 520 inside this original frame. */
      --wy-artwork-width:832px;
      --wy-artwork-height:520px;
      --wy-artwork-fit:min(
        tan(atan2(100cqw,var(--wy-artwork-width))),
        tan(atan2(100cqh,var(--wy-artwork-height)))
      );
      position:absolute;
      inset:50% auto auto 50%;
      z-index:1;
      display:block;
      width:var(--wy-artwork-width);
      height:var(--wy-artwork-height);
      margin:0;
      padding:0;
      container-type:inline-size;
      container-name:var(--wy-artwork-query);
      transform:translate(-50%,-50%) scale(var(--wy-artwork-fit));
      transform-origin:50% 50%;
      /* Keep the established desktop UI tokens within its own reference
         coordinate system. External mobile copy never inherits these. */
      --wy-fs-micro:13px;
      --wy-fs-small:15px;
      --wy-fs-body:17px;
      --wy-fs-h4:17px;
      --wy-fs-h3:24px;
      --wy-fs-h2:32px;
      font-size:var(--wy-fs-body);
    }
    @supports (transform:scale(calc(1px / 1px))) {
      [data-wy-ui-artwork] > .wy-ui-artboard {
        --wy-artwork-fit:min(
          calc(100cqw / var(--wy-artwork-width)),
          calc(100cqh / var(--wy-artwork-height))
        );
      }
    }
  }
}
