/* Video fitting (SOP 323) — self-fit layer for video, extending the image
   self-fit standard. On load, video-fit.js detects each video's own shape
   (videoWidth / videoHeight on loadedmetadata) and sets that element's
   aspect-ratio from its own dimensions. This stylesheet is the standing
   frame: width 100%, height auto, centred, object-fit contain — the whole
   video is shown, never stretched, squashed or band-cropped. Video bytes
   are never altered; only presentation is fitted. Posters are fitted as
   photos (contain, centred). Outside embeds get a responsive
   aspect-ratio wrapper (our frame); the inside presentation is the
   outside player's own. */
video {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  background: #000;
}
video[poster] {
  object-fit: contain;
  object-position: center;
}
.video-fit-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
}
.video-fit-embed iframe,
.video-fit-embed embed,
.video-fit-embed object,
.video-fit-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: 0;
  display: block;
  object-fit: contain;
  object-position: center;
}
iframe[src*="youtube"],
iframe[src*="youtu.be"],
iframe[src*="vimeo"],
embed, object {
  max-width: 100%;
}
