/*
 * DP-4242: BSP 4.7's diagonal environment ribbon in the CMS top-right corner (BSP 5 draws a pill).
 * A 45deg band centred on the corner diagonal, long enough to run off both viewport edges.
 * --reach: where the band's lower edge meets the top and right edges (under the 68px header).
 */
[dir=ltr] .Page .Page-env.toolEnv {
  --reach: 4rem;
  --h: 1rem;
  position: fixed;
  z-index: 1001;
  top: calc(var(--reach) / 2 - var(--h) * 0.8536);
  right: calc(var(--reach) * -0.2071 - var(--h) * 0.8536);
  display: block;
  width: calc(var(--reach) * 1.4142 + var(--h));
  min-width: 0;
  max-width: none;
  height: var(--h);
  margin: 0;
  margin-inline-end: 0 !important; /* vendor: .Page-header > * {margin-inline-end: 1rem !important} */
  padding: 0 var(--h);
  overflow: hidden;
  border-radius: 0;
  background-color: #3c3c3c;
  color: #fff;
  font-size: 0.625rem;
  line-height: var(--h);
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(45deg);
}

/* Keep the header's right-most control and the login build banner clear of the ribbon. */
[dir=ltr] .Page-header.is-env {
  padding-right: 4rem;
}

body.Page--unauthenticated .Page-env.buildInfo {
  top: 4.5rem;
}
