/* Keep the desktop canvas proportional where the original template uses
   absolute positions for its text, pictures and controls. */
@media (min-width: 1221px) {
  .news-home,
  .cm-secondary {
    --cm-canvas-zoom: 1.16;
  }

  .cm-secondary:not(.news-index, .cm-contactus) {
    --cm-canvas-zoom: 1;
  }

  .news-home #smv_Main,
  .cm-secondary #smv_Main {
    zoom: var(--cm-canvas-zoom);
  }

  /* The legacy full-bleed background is sized to the viewport by its script. */
  .cm-contactus #smv_MainContent {
    overflow-x: clip;
  }

  .news-home:lang(zh) #smv_Main > #smv_con_105_17 {
    left: 558px !important;
    width: 429px !important;
  }
}

@media (min-width: 1400px) {
  .news-home,
  .cm-secondary {
    --cm-canvas-zoom: 1.28;
  }

  .cm-secondary:not(.news-index, .cm-contactus) {
    --cm-canvas-zoom: 1.12;
  }
}

@media (min-width: 1560px) {
  .news-home,
  .cm-secondary {
    --cm-canvas-zoom: 1.4;
  }

  .cm-secondary:not(.news-index, .cm-contactus) {
    --cm-canvas-zoom: 1.23;
  }
}

@media (min-width: 1800px) {
  .news-home,
  .cm-secondary {
    --cm-canvas-zoom: 1.5;
  }

  .cm-secondary:not(.news-index, .cm-contactus) {
    --cm-canvas-zoom: 1.28;
  }
}

@media (min-width: 1221px) {
  /* Align homepage sections with the margins of the studio and news canvas. */
  .news-home #selected-work-desktop,
  .news-home #service-guide-desktop .sd-inner {
    width: calc(974px * var(--cm-canvas-zoom));
    padding-inline: 0;
  }
}

@media (min-width: 801px) {
  .news-detail .news-reading {
    max-width: 940px;
  }

  .news-detail:lang(en) .news-reading {
    max-width: 880px;
  }

  .news-detail .news-reading:has(> article > .news-reading-header) {
    max-width: 1080px;
  }

  .news-detail:lang(en) .news-reading:has(> article > .news-reading-header) {
    max-width: 1000px;
  }

  .news-detail.cm-service-page .news-reading,
  .news-detail.studio-case-page .news-reading {
    max-width: 1380px;
  }

  .cm-service-page .cm-service-content {
    max-width: 980px;
  }

  .cm-service-page .cm-service-hero p {
    max-width: 76ch;
  }
}
