/* UI6 cross-page surface refinements relocated from retired hero/carousel owners. */
#morgen-v6-root .mg6-sitebar,
#morgen-v6-root .mg6-sitebar.is-scrolled {
  box-shadow: none;
}

#morgen-v6-root .mg6-sitebar {
  transition: top var(--mg6-duration-base) var(--mg6-ease);
}

/* About-only banner reading flow. */
#morgen-v6-root .mg6-banner--image.mg6-banner--feedback-about .mg6-banner__head {
  grid-template-columns: minmax(0, 1fr);
}

#morgen-v6-root .mg6-banner--image.mg6-banner--feedback-about .mg6-banner__heading {
  width: min(760px, 100%);
  max-width: 100%;
}

#morgen-v6-root .mg6-banner--image.mg6-banner--feedback-about .mg6-banner__heading > .mg6-breadcrumbs {
  margin: 0 0 clamp(12px, 1.25vw, 18px);
  color: var(--mg6-ink-muted);
  text-shadow: none;
}

#morgen-v6-root .mg6-banner--image.mg6-banner--feedback-about .mg6-banner__heading > .mg6-banner__lede {
  width: auto;
  max-width: 680px;
  margin: clamp(16px, 1.5vw, 22px) 0 0;
  color: var(--mg6-ink-muted);
  text-shadow: none;
}

@media (max-width: 900px) {
  #morgen-v6-root .mg6-banner--image.mg6-banner--feedback-about .mg6-banner__heading {
    width: min(720px, 100%);
  }
}

/* Normalize terminal page whitespace only. */
#morgen-v6-root > section:last-of-type,
#morgen-v6-root > main > section:last-of-type,
#morgen-v6-root > .mg6-main > section:last-of-type {
  margin-bottom: 0;
}

/* Homepage media loading shimmer. */
#morgen-v6-root :is(.mg6-media-card > a, .mg6-video-card__media) {
  position: relative;
  isolation: isolate;
}

#morgen-v6-root .mg6-entry-shimmer {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(108deg,
      transparent 22%,
      rgba(255, 255, 255, .10) 38%,
      rgba(255, 255, 255, .52) 50%,
      rgba(255, 255, 255, .12) 62%,
      transparent 78%);
  background-position: 155% 0;
  background-size: 310% 100%;
  opacity: 0;
  pointer-events: none;
}

#morgen-v6-root :is(.mg6-media-card, .mg6-video-card).is-mg6-entry-shimmering .mg6-entry-shimmer {
  animation: mg6-entry-shimmer-pass var(--mg6-entry-shimmer-duration, 800ms) cubic-bezier(.2, .72, .2, 1) both;
  will-change: background-position, opacity;
}

@keyframes mg6-entry-shimmer-pass {
  0%, 7% { background-position: 155% 0; opacity: 0; }
  18% { opacity: .72; }
  76% { opacity: .38; }
  100% { background-position: -155% 0; opacity: 0; }
}

/* Technical-library load-more refinement. */
body #morgen-v6-root #mg6-document-library .mg6-doc-load {
  width: auto;
  min-width: 0;
  min-height: 34px;
  height: 34px;
  gap: 7px;
  margin: clamp(22px, 3vw, 34px) auto 0;
  padding: 2px 12px;
  border: 1px solid rgba(var(--mg6-ink-rgb), .20);
  border-radius: var(--mg6-radius-control, 8px);
  background: transparent;
  color: var(--mg6-ink-mid, var(--mg6-ink));
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1;
  white-space: nowrap;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, opacity 150ms ease;
}

body #morgen-v6-root #mg6-document-library .mg6-doc-load::after { content: none; display: none; }

body #morgen-v6-root #mg6-document-library .mg6-doc-load:hover,
body #morgen-v6-root #mg6-document-library .mg6-doc-load:focus-visible {
  border-color: rgba(var(--mg6-ink-rgb), .38);
  background: rgba(var(--mg6-ink-rgb), .035);
  color: var(--mg6-ink);
  box-shadow: none;
  transform: none;
}

body #morgen-v6-root #mg6-document-library .mg6-doc-load:focus-visible {
  outline: 2px solid var(--mg6-focus-ring);
  outline-offset: 2px;
}

body #morgen-v6-root #mg6-document-library .mg6-doc-load:disabled,
body #morgen-v6-root #mg6-document-library .mg6-doc-load[aria-disabled="true"] {
  cursor: default;
  opacity: .62;
  transform: none;
}

body #morgen-v6-root #mg6-document-library .mg6-doc-load__spinner {
  display: none;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: .78;
}

body #morgen-v6-root #mg6-document-library .mg6-doc-load[aria-busy="true"] .mg6-doc-load__spinner {
  display: inline-block;
  animation: mg6-doc-load-spin 620ms linear infinite;
}

@keyframes mg6-doc-load-spin { to { transform: rotate(360deg); } }

body #morgen-v6-root .morgen-release-version--inline {
  min-height: 17px;
  padding: 2px 6px;
  font-size: 8px;
  letter-spacing: .08em;
  line-height: 1;
  opacity: .6;
  cursor: default;
  transition: opacity 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  body #morgen-v6-root .morgen-release-version--inline:hover { opacity: 1; }
}

@media (max-width: 640px) {
  body #morgen-v6-root #mg6-document-library .mg6-doc-load {
    width: auto;
    max-width: calc(100% - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #morgen-v6-root .mg6-sitebar,
  body #morgen-v6-root #mg6-document-library .mg6-doc-load,
  body #morgen-v6-root .morgen-release-version--inline {
    transition: none;
  }
  #morgen-v6-root .mg6-entry-shimmer { display: none !important; animation: none !important; }
  body #morgen-v6-root #mg6-document-library .mg6-doc-load[aria-busy="true"] .mg6-doc-load__spinner { animation: none; }
}

@media print {
  #morgen-v6-root .mg6-entry-shimmer,
  body #morgen-v6-root #mg6-document-library .mg6-doc-load,
  body #morgen-v6-root .morgen-release-version--inline { display: none !important; }
}

@media (forced-colors: active) {
  body #morgen-v6-root #mg6-document-library .mg6-doc-load,
  body #morgen-v6-root .morgen-release-version--inline {
    border-color: ButtonText;
    background: Canvas;
    color: ButtonText;
  }
  body #morgen-v6-root #mg6-document-library .mg6-doc-load__spinner {
    border-color: ButtonText;
    border-right-color: transparent;
  }
}