/* Product screenshots remain uncropped and can be opened at full resolution. */
a.screenshot-link {
  display: block;
  min-width: 0;
  border: 0 !important;
  color: inherit;
  cursor: zoom-in;
}

a.screenshot-link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

a.screenshot-link img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: none;
}

figcaption.screenshot-caption {
  padding: .85rem 1rem;
  border-top: 1px solid var(--rule, #20272a);
  color: var(--text, #a6b0ae);
  font: 400 .8125rem/1.5 var(--sans, sans-serif);
}

.task-screenshot {
  margin: 1.5rem 0 0;
  border: 1px solid var(--rule, #20272a);
}

body[data-page="landing"] .strip {
  flex-wrap: wrap;
}

body[data-page="landing"] .strip a {
  margin-left: auto;
}

@media print {
  a.screenshot-link {
    cursor: auto;
  }
}

/* One native modal for image and video links. */
body[data-page] .media-viewer {
  width: min(96vw, 120rem);
  max-width: none;
  max-height: 94dvh;
  margin: auto;
  padding: 1rem;
  border: 1px solid #30383a;
  border-radius: .375rem;
  background: #080b0d;
  color: #eef4f2;
  font: .875rem/1.5 Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}
.media-viewer::backdrop { background: rgb(0 0 0 / .88); }
html:has(.media-viewer[open]) { overflow: hidden; }
.media-viewer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.media-viewer-toolbar form { margin: 0; }
body[data-page] .media-viewer-toolbar a { color: #14fcfc; }
body[data-page] .media-viewer-toolbar button {
  padding: .5rem 1rem;
  border: 1px solid #414c4d;
  border-radius: .25rem;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
body[data-page] .media-viewer-content > :is(img, video) { display: block; width: 100%; height: auto; max-height: calc(94dvh - 9rem); object-fit: contain; }
body[data-page] .media-viewer > p { margin: .75rem 0 0; color: #a6b0ae; font: inherit; }
@media print { .media-viewer { display: none; } }

/* Video previews use the same viewer as screenshot links. */
a.media-link { display: block; position: relative; border: 0; color: inherit; }
a.media-link video { display: block; width: 100%; height: auto; }
.media-preview-label {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: .5rem .875rem;
  border: 1px solid #414c4d;
  border-radius: .25rem;
  background: #080b0d;
  color: #eef4f2;
  font: 600 .875rem/1.5 Arial, Helvetica, sans-serif;
  pointer-events: none;
}
