/* Motivation: unaligned human vs robot videos */
#motivation {
  --line: #e6e6e6;
}

#motivation button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

#motivation .mv-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75em 1.5em;
  margin-bottom: 1.25em;
}

#motivation .mv-seg {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: solid 1px var(--line);
  border-radius: 8px;
}

#motivation .mv-seg button {
  padding: 0.3em 1em;
  border-radius: 5px;
  font-size: 0.8em;
  line-height: 1.6em;
  color: #787878;
}

#motivation .mv-seg button:hover { color: #333; }
#motivation .mv-seg button.on { background: var(--accent); color: #fff; }

#motivation .mv-play {
  padding: 0.3em 1em;
  border: solid 1px var(--line);
  border-radius: 8px;
  font-size: 0.8em;
  line-height: 1.6em;
  color: #555;
}

#motivation .mv-play:hover { background: #f4f4f4; }

/* ---- Videos ---- */
#motivation .mv-videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1em;
  margin-bottom: 1.5em;
}

#motivation .mv-cell { display: flex; flex-direction: column; gap: 0.35em; }

#motivation .mv-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  font-size: 0.88em;
  line-height: 1.4em;
  color: black;
}

#motivation .mv-name span { color: #888; font-size: 0.9em; }

#motivation .mv-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #f4f4f4;
}

#motivation .mv-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* the head-camera footage is dim; same brightening as the Alignment Results videos. The human clip is already
   brighter (avg. luma ~98 vs ~79 for the robot) and washes out at 1.4, so it gets a gentler boost. */
#motivation .mv-frame video { filter: brightness(1.4) contrast(1.05) saturate(1.15); }
#motivation .mv-frame video[data-who=human] { filter: brightness(1.1) contrast(1.05) saturate(1.1); }
#motivation .mv-frame video::-webkit-media-controls { display: none !important; }

#motivation .mv-frame.missing { background: repeating-linear-gradient(135deg, #f4f4f4 0 10px, #ececec 10px 20px); }
#motivation .mv-frame.missing video { visibility: hidden; }

#motivation .mv-frame.missing::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 11px;
  color: #999;
}

#motivation .mv-time {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-family: monospace;
  font-size: 13px;
  line-height: 18px;
}

#motivation .mv-phase {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  line-height: 18px;
}

/* ---- Timelines ---- */
#motivation .mv-timeline {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr);
  column-gap: 0.75em;
  align-items: center;
}

#motivation .mv-label { font-size: 0.85em; line-height: 1.3em; color: #333; }

#motivation .mv-track {
  position: relative;
  height: 1.7em;
  border-radius: 4px;
  background: #f6f6f6;
}

#motivation .mv-s {
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: solid 2px #fff;
  font-size: 0.65em;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
}

#motivation .mv-s.irrelevant {
  background: repeating-linear-gradient(135deg, #d9d9d9 0 5px, #cbcbcb 5px 10px);
  color: #666;
}

#motivation .mv-s:first-child { border-radius: 4px 0 0 4px; }

/* segment too narrow for its label: hide the label */
#motivation .mv-s.tight span { display: none; }

#motivation .mv-head {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-left: -1px;
  background: black;
  pointer-events: none;
}

#motivation .mv-links { display: block; width: 100%; height: 2.2em; }

#motivation .mv-axis {
  position: relative;
  height: 1.4em;
  margin-top: 0.25em;
}

#motivation .mv-axis span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: monospace;
  font-size: 12px;
  color: #a2a2a2;
}

#motivation .mv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.25em;
  margin-top: 0.5em;
  font-size: 0.85em;
  line-height: 1.4em;
  color: #555;
}

#motivation .mv-legend i {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.4em;
  border-radius: 2px;
  vertical-align: -0.1em;
}

/* ---- Segment pairing (prior work vs BATCH) ---- */
#motivation .mv-modes { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5em; margin-bottom: 1.25em; }
#motivation .mv-mode-note { margin: 0; font-size: 0.9em; line-height: 1.5em; color: #555; }

#motivation .mv-win {
  display: none;
  position: absolute;
  top: -4px;
  bottom: -4px;
  z-index: 1;
  border: solid 2.5px #333;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

#motivation.mv-pairs .mv-win[data-i="0"] { display: block; }
#motivation [data-win-link] { display: none; }
#motivation.mv-pairs [data-win-link="0"] { display: inline; }
#motivation.mv-pairs [data-phase-link] { display: none; }




/* one-liner between the human and robot timelines */
#motivation .mv-linkrow { position: relative; }
#motivation .mv-linktext {
  display: none;
  position: absolute;
  top: 50%;
  padding: 0;
  font-size: 0.75em;
  line-height: 1.5em;
  white-space: nowrap;
  pointer-events: none;
}
#motivation.mv-pairs .mv-linktext { display: block; }
