.research-media-section {
  max-width: 1180px;
  margin: 3.5rem auto;
}

.research-media-section:last-child {
  margin-bottom: 0;
}

.research-media-title {
  margin-bottom: 1.4rem !important;
  font-family: 'Google Sans', sans-serif;
  font-size: 2rem !important;
  line-height: 1.3;
  text-align: center;
}

.research-media-copy {
  max-width: 860px;
  margin: 0 auto 1.5rem;
  color: #4c5965;
  font-size: 1.05rem;
  line-height: 1.65;
  text-align: center;
}

.research-media-figure,
.research-case {
  min-width: 0;
  margin: 0;
}

.research-video,
.research-media-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #050705;
  border: 1px solid rgba(118, 185, 0, 0.2);
  border-radius: 6px;
}

.research-media-figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

.training-media-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr);
  gap: 20px;
}

.training-ego-view .research-video {
  aspect-ratio: 936 / 704;
}

.research-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--media-line);
  border-radius: 6px;
}

.research-mosaic video {
  border: 0;
  border-radius: 0;
}

.research-mosaic [aria-label="Table pick-up"] video {
  filter: contrast(0.86) brightness(0.83);
}

#additional-deployment .deployment-feature-head {
  display: flex;
  align-items: center;
}

#additional-deployment h4.title {
  margin: 0;
  text-align: left;
}

.research-media-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  cursor: zoom-in;
}

.media-expand {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: 8px;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 0;
  opacity: 0;
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

.media-expand i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
}

.research-media-frame:hover .media-expand,
.media-expand:focus-visible {
  opacity: 1;
}

.research-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(118, 185, 0, 0.25);
  border-radius: 4px;
  cursor: pointer;
}

.research-icon-button:hover,
.media-expand:hover i {
  color: #a8dc2f;
  background: #25311e;
}

.research-icon-button:focus-visible,
.media-expand:focus-visible {
  outline: 2px solid #76b900;
  outline-offset: 3px;
}

.media-expand:focus-visible {
  outline-offset: -3px;
}

.research-icon-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.research-icon-button[hidden] {
  display: none;
}

.media-comparison {
  --reveal: 50%;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(32, 36, 42, 0.16);
  border-radius: 6px;
}

.comparison-stage {
  position: relative;
  aspect-ratio: 1824 / 916;
  overflow: hidden;
  background: #dce0d9;
}

.comparison-stage video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.comparison-reconstruction {
  -webkit-mask-image: linear-gradient(to right, transparent calc(100% - var(--reveal)), #000 calc(100% - var(--reveal)));
  mask-image: linear-gradient(to right, transparent calc(100% - var(--reveal)), #000 calc(100% - var(--reveal)));
  -webkit-mask-size: 50% 100%;
  mask-size: 50% 100%;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
}

.comparison-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #a8dc2f;
  pointer-events: none;
}

.comparison-divider-first {
  left: calc((100% - var(--reveal)) / 2);
}

.comparison-divider-second {
  left: calc(50% + (100% - var(--reveal)) / 2);
}

.comparison-label {
  position: absolute;
  top: 12px;
  max-width: calc(50% - 20px);
  padding: 6px 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 4px;
  font-size: 0.8rem;
  line-height: 1.3;
  pointer-events: none;
}

.comparison-label-reference {
  left: 12px;
}

.comparison-label-reconstruction {
  right: 12px;
}

.comparison-controls {
  display: grid;
  grid-template-columns: 36px auto minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #283329;
  background: #fff;
  font-size: 0.85rem;
}

.comparison-range {
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  accent-color: #76b900;
  cursor: ew-resize;
}

.no-fullscreen .comparison-controls {
  grid-template-columns: 36px auto minmax(0, 1fr) auto;
}

.media-comparison:fullscreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  background: #080b08;
  border: 0;
  border-radius: 0;
}

.media-comparison:fullscreen .comparison-stage,
.media-comparison:fullscreen .comparison-controls {
  align-self: center;
  width: min(100%, calc(199.12vh - 200px));
}

.research-video-dialog {
  width: min(1120px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 16px;
  color: #f3f7ed;
  background: #0e130f;
  border: 1px solid rgba(154, 214, 41, 0.35);
  border-radius: 8px;
}

.research-video-dialog::backdrop {
  background: rgba(0, 0, 0, 0.86);
}

.research-dialog-header,
.research-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.research-dialog-header {
  justify-content: space-between;
  margin-bottom: 12px;
}

.research-dialog-header h3 {
  min-width: 0;
  margin: 0;
  color: inherit;
  font-size: 1.15rem;
  line-height: 1.4;
}

.research-video-dialog video {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 116px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

body.research-dialog-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .research-media-title {
    font-size: 1.55rem !important;
  }

  .training-media-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .research-media-section {
    margin-top: 2.75rem;
    margin-bottom: 2.75rem;
  }

  .comparison-controls {
    gap: 8px;
    padding: 8px;
  }

  .comparison-label {
    top: 6px;
    padding: 4px 6px;
    font-size: 0.7rem;
  }

  .research-dialog-header h3 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .media-expand {
    padding: 4px;
  }

  .media-expand i {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
}

@media (hover: none) {
  .media-expand {
    opacity: 1;
  }
}
